Skip to content

Latest commit

 

History

History

02-counting-characters

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Bash Logo

Counting the Number of Characters

Create a program that prompts for an input string and dis- plays output that shows the input string and the number of characters the string contains.

Example Output

 What is the input string? Homer
 Homer has 5 characters.

Constraints

  • Be sure the output contains the original string.
  • Use a single output statement to construct the output.
  • Use a built-in function of the programming language to determine the length of the string.

Challenges

-If the user enters nothing, state that the user must enter something into the program.