Question: Consider the following two code segments labeled CODE SEGMENT 1 and CODE SEGMENT 2 : / / CODE SEGMENT 1 int grade 1 ; cout
Consider the following two code segments labeled CODE SEGMENT and CODE SEGMENT :
CODE SEGMENT
int grade;
cout "Please enter your grade: ;
cin grade;
if grade
cout A endl;
else if grade
cout B endl;
else
cout "Below A or B endl;
CODE SEGMENT
int grade;
cout "Please enter your grade: ;
cin grade;
if grade
cout "Below A or B endl;
if grade
cout B endl;
if grade
cout A endl;
Assuming the user enters the same value each time gradegrade what can you sabout the output?
The output from both code segments will always be different.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
