Solved

What Is the Problem with This Bit of Code? on Most

Question 5

Essay

What is the problem with this bit of code? On most systems,you don't get a chance to enter the letter.Why?
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

Correct Answer:

verifed

Verified

On some systems,you won't get a chance t...

View Answer

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

Related Questions