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 1 and CODE SEGMENT 2:
// CODE SEGMENT 1
int grade1;
cout "Please enter your grade: ";
cin grade1;
if (grade1>=90)
{
cout "A" endl;
}
else if (grade180)
{
cout "B" endl;
}
else
{
cout "Below A or B" endl;
}
// CODE SEGMENT 2
int grade2;
cout "Please enter your grade: ";
cin grade2;
if (grade 280)
{
cout "Below A or B"8 endl;
}
if (grade 290)
{
cout & "B" & endl;
}
if (grade290)
{
cout & "A" endl;
}
Assuming the user enters the same value each time (grade1==grade2), what can you say about the output?
 Consider the following two code segments labeled CODE SEGMENT 1 and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!