Answer to Question #219124 in C++ for Bless

Question #219124

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:

#include <iostream>

using namespace std;

int main() {

  char letterToQuit;

  int numPresses;

  cin >> letterToQuit;

  cin >> numPresses;

  /* Your solution goes here */

  return 0;

}

1
Expert's answer
2021-07-20T10:02:53-0400
#include <iostream>


using namespace std;




int main() {


  char letterToQuit;


  int numPresses;


  cin >> letterToQuit;


  cin >> numPresses;




  /* Your solution goes here */
  cout << "Press the " << letterToQuit << " key " << numPresses << " times to quit." << endl;

  return 0;
}




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