Your SlideShare is downloading. ×
0
If
If
If
If
If
If
Upcoming SlideShare
Loading in...5
×

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.
Text the download link to your phone
Standard text messaging rates apply

If

182

Published on

Published in: Education, Lifestyle, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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

×