Solved

On Most Systems,you Don't Get a Chance to Enter the Letter

Question 26

Essay

On most systems,you don't get a chance to enter the letter when the code given below is run.Write two different code fragments that repair the problem.
cout << "Enter a number:\n";
int number;
cin >> number;
cout << "Enter a letter;\n";
char symbol;
cin.get(symbol);
cout << number << " " << symbol << endl;
Dialog: (Computer output is bolded. )
Enter a number:
21
Now enter a letter:
21
On my system,like many systems,one doesn't get a chance to type the letter.

Correct Answer:

verifed

Verified

#include <iostream>
using namespac...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions