Answer to Question #99407 in C++ for Caleb

Question #99407
Print a message telling a user to press the letterToQuit key numPresses times to quit. End with newline. Ex: If letterToQuit = 'q' and numPresses = 2, print:
Press the q key 2 times to quit.
1
Expert's answer
2019-12-16T05:40:18-0500

# include<iostream>

Using namespace std ;

Int main()

{

Char letter ;

int number ;

Cout<< " letter to quit \n";

Cin>> letter;

Cout<< " number of times" letter pressed\n";

Cin>> numbers;

Cout<< " press the " <<letter<<" key"<< number "times to quit ";

For( int i=0 i < number i++)

{

Cin>> letter;

}

return 0;

}



output will be :




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS