Add the word in a string

In this program, we will add the word in a string.

Steps to solve the program
  1. Take a word as input from the user.
  2. Create an empty string.
  3. Add each character from the input word to the empty string using for loop with the range function.
  4. Print the output.

Output :

construct the following pattern

count the number of even and odd numbers from a series of numbers

Leave a Comment