You are on page 1of 2

Tutorial 7

(1) Given the conditions, S=0, Y=4, B=7, T=8 and X=3, determine whether the message box displays for each of the following:
(a) If S>0 Then MessageBox.Show(Computation Complete) End If (b) If B=4 Or T>7 Then If X>1 Then MessageBox.Show(Computation Complete) End If End If (c) If X=3 Or T>2 Then If Y>7 Then MessageBox.Show(Computation Complete) End If End If (d) If X + 2 < 5 Then If B < Y+X Then MessageBox.Show(Computation Complete) End If End If

(2)

What is the use of Radio Button in VB.NET? Given the following: E=500 S=700 J=1 T=60 I=40

(3)

Determine the truth value of the following conditions: a. E<400 OR J=1 b. S=700 AND T=500
c.

S-T=640 AND (J<>1)

d. T+I = S-500 OR J=0 e. S<300 AND I<50 OR J=1


f.

S<300 AND <> (I<50 OR J=1)

(4) Give an example of a situation where nested Ifs would be appropriate. (5) When would it be appropriate to use a Case Structure? Give example.

You might also like