Question: Write a VB program to ask user to assign a value to i to find the answer for the following three cases. Case 1 .

Write a VB program to ask user to assign a value to i to find the answer for the following three cases.
Case 1. Assume i =1 and HowMuch =0
IF i <5 THEN
HowMuch = HowMuch +1
ELSEIF i =5 THEN
HowMuch = HowMuch -5
ELSE
HowMuch = HowMuch +3
END IF
DISPLAY HowMuch
Case 2. Assume i =5 and HowMuch =0
IF i <5 THEN
HowMuch = HowMuch +1
ELSEIF i =5 THEN
HowMuch = HowMuch -5
ELSE
HowMuch = HowMuch +3
END IF
DISPLAY HowMuch
Case 3. Assume i =6 and HowMuch =0
IF i <5 THEN
HowMuch = HowMuch +1
ELSEIF i =5 THEN
HowMuch = HowMuch -5
ELSE
HowMuch = HowMuch +3
END IF
DISPLAY HowMuch

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