Channing S.

asked • 12/22/16

If Statements (CS) Visual Basic

1. 
intX = 129
intY = 200
intCount = 1
 
If (intX > 120 And intY < 30) Then
intCount = intCount + 1
Else
intCount = -1
End If
 
intCount = ?????
 
Can someone please explain this to me?

2 Answers By Expert Tutors

By:

David W. answered • 12/23/16

Tutor
4.6 (64)

Experienced Prof

Mark B.

tutor
Agreed operator precedence and careful use of parentheses is an important part of understanding expressions in general, not just conditions. Hard to know if the intent here was to be tricky, but you could be right!
Report

12/23/16

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.