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.

Expert's answer

# 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 :




LATEST TUTORIALS
APPROVED BY CLIENTS