After the following statements are executed, val should contain a capital letter. Write a while loop to follow the given code that will repeatedly reprompt and reread input if this is not the case. (note that a capital letter is anything >='A' and <= 'Z') char val; cout<<"Enter a capital letter\n"; cin>>val;

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 9RQ
icon
Related questions
Question
100%

After the following statements are executed, val should contain a capital letter. Write a while loop to follow the given code that will repeatedly reprompt and reread input if this is not the case. (note that a capital letter is anything >='A' and <= 'Z')


char val;
cout<<"Enter a capital letter\n";
cin>>val;

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning