Question: An integer variable called Midterm stored an integer from O to 100. Whichone of the following pieces of code gives a different result to

An integer variable called Midterm stored an integer from O to 100.

Whichone of the following pieces of code gives a different result to

An integer variable called Midterm stored an integer from O to 100. Whichone of the following pieces of code gives a different result to the others? If Midterm >= 30 Then If Midterm < 75 Then If Midterm 50 Then MsgBox "Good luck!" Else MsgBox "Keep it up!" End If Else If Midterm < 90 Then MsgBox "Very good!" Else MsgBox "Excellent!" End If End If Else MsgBox "Work harder next time!" End If If Midterm < 50 Then If Midterm >= 30 Then MsgBox "Work harder next time!" Else MsgBox "Good luck!" End If Elself Midterm < 98 Then If Midterm >= 75 Then MsgBox "Very good!" Else MsgBox "Keep it up!" End If Else MsgBox "Excellent!" End If If Midterm >= 90 Then MsgBox "Excellent!" Elself Midterm >= 75 Then MsgBox "Very good!" Elself Midterm >= 50 Then MsgBox "Keep it up!" Elself Midterm >= 30 Then MsgBox "Work harder next time!" Else MsgBox "Good luck!" End If If Midterm < 30 Then MsgBox "Good luck!" Elself Midterm < 58 Then MsgBox "Work harder next time!" Elself Midterm < 75 Then MsgBox "Keep it up!" Elself Midterm < 98 Then MsgBox "Very good!" Else MsgBox "Excellent!" End If

Step by Step Solution

3.33 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To determine which piece of code gives a different result we need to compare what each code ... View full answer

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 Programming Questions!