Question: Three characters are read from input into variables char 1 , char 2 , and char 3 . If char 1 and char 3 are

Three characters are read from input into variables char1, char2, and char3. If char1 and char3 are both digits, then output "Digits chosen". Otherwise, output "Not only digits chosen". End each output with a newline.
Ex 1: If the input is 7@9, then the output is:
Digits chosen
Ex 2: If the input is 5d!, then the output is:
Not only digits chosen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!