Assume that the variables gpa, dealsnList and studentName, have been declared and initialized. Write a statement that both adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

Assume that the variables gpa, dealsnList and studentName, have been declared and initialized.  Write a statement that both adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

LANGUAGE: Visual Basic

CHALLENGE:

Assume that the variables gpa, dealsnList and studentName, have been declared and initialized. Write a statement that both adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

SOLUTION:

If gpa > 3.5 Then
    deansList = deansList + 1
    MessageBox.Show(studentName)
End If


Add comment