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<< “ “ < Dialog: (Computer output is bolded.)
Enter a number:
21
Now enter a letter:
21

On some systems, you won’t get a chance to enter the letter. On others, you don’t get the ‘A’ in the variable symbol. What happens is that you enter a number, followed by a newline to get the system to accept the number. That, too is a character that is read by the cin.get(symbol). That, being satisfied, continues to the output statement.

Computer Science & Information Technology

You might also like to view...

What is the purpose of the SFC command?

A) Repair system files B) Set the system root directory C) Remotely access a network device D) Transfer files securely across a network

Computer Science & Information Technology

Case WD 2-2Jon heard from a co-worker that he saves at least 10 minutes a day using the Redo, Undo, and Repeat commands.  So, Jon is checking it out to see if he can also save time by using these commands.Jon wants to use the Redo button, but does not see it. That is because the Redo button does not appear on the Quick Access Toolbar until ____.

A. you have undone something B. you have done something C. you have changed a property D. you have added it to the Quick Access toolbar

Computer Science & Information Technology