0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# If

182

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
182
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. IF
• 2. IF is All Around Us EverydayIF it is cold out THEN you will put a coat onELSE leave the coat at homeIF you do your homestudy THEN no detentionELSE you get a detention
• 3. IF Is Like A Test With An EffectThe test: Is it cold? The Effect if the test is True: Put your coat on IF it is cold out THEN you will put a coat on ELSE leave the coat at home The Effect if the test is False: Leave coat at home
• 4. The Structure of IF in VBIf <TEST> Then<CODE IF THE TEST IS TRUE>Else :<CODE IF THE TEST IS FALSE>End If
• 5. Are You Old Enough To Drink?Module Module1 Sub Main() Dim age As Integer = 14 If age > 16 Then Console.WriteLine("old enough") Console.ReadLine() Else : Console.WriteLine("Your not old enough!!") Console.ReadLine() End If End SubEnd Module
• 6. Are You Old Enough To Drink? – With User InputModule Module1 Sub Main() Dim age As Integer Console.WriteLine("ENTER YOUR AGE") age = Console.ReadLine() If age > 16 Then Console.WriteLine("old enough") Console.ReadLine() Else : Console.WriteLine("Your not old enough!!") Console.ReadLine() End If End SubEnd Module