Question: Please create a Desk Check for the following programs. There should be three tables, one for each of the three problems. Start by annotating the
Please create a Desk Check for the following programs. There should be three tables, one for each of the
three problems. Start by annotating the code with line numbers. Each will be turned in by hand at the
beginning of class. Please print this sheet out and put your name on it:
Problem 1: Convert grade
{
int numGrade = 70;
char letter = 'F';
if (numGrade >= 80)
{
if (numGrade >= 90)
letter = 'A';
else
letter = 'B';
}
else
{
if (numGrade >= 70)
letter = 'C';
else
letter = 'D';
}
}
Problem 2: Prompt
The user input is 2, 0, 10 in the following code:
{
int numCookies = 0;
while (numCookies < 4)
{
cout << "Daddy, how many cookies "
"can I have? ";
cin >> numCookies;
}
cout << "Thank you daddie!\n";
}
Problem 3: Counter
{
int iUp = 0;
int iDown = 10;
while (iUp < iDown)
{
cout << iUp << '\t'
<< iDown << endl;
iUp++;
iDown--;
}
}
Step by Step Solution
3.48 Rating (148 Votes )
There are 3 Steps involved in it
To complete the desk check for the given programs well walk through each problem annotate the code w... View full answer
Get step-by-step solutions from verified subject matter experts
