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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
College Mathematics for Business Economics Life Sciences and Social Sciences
Authors: Raymond A. Barnett, Michael R. Ziegler, Karl E. Byleen
12th edition
321614003, 978-0321614001
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App