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:

Verified
#include <iostream>
using namespac...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
using namespac...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q21: Given the following definition and initialization.Write a
Q22: A C-string variable is an array,so it
Q23: It is illegal to write char message[]
Q24: Write code to define a C-string aString
Q25: Write an if-else statement using a C-string
Q27: Does this code have a problem?<br>char strVar[]
Q28: To read a character at a time,or
Q29: Write a short C++ code fragment that
Q30: A C-string variable with a something in
Q31: If you want to examine an input