Your SlideShare is downloading. ×
0
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
3-Looping and Branching
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

3-Looping and Branching

41

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
41
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. USING CONDITIONAL CODE
  • 2. CONDITIONAL CODE If( ) { } condition // your additional code goes here // . . .
  • 3. TERMINOLOGY parentheses brackets braces ( ) { } [ ]
  • 4. CONDITIONAL CODE If( ) { } condition echo “it’s true!”; // . . . $a < 50$b > 20 true or false? $c == 99$c === 99$d != 100 Code block
  • 5. EQUALITY If( $a == $b ){ // execute this code }
  • 6. ASSIGNMENT INSTEAD OF EQUALITY $a = 5; $b = 10; If( $a = $b ){ // always true! }
  • 7. OPERATOR WITH = = assignment == equality === strict equality
  • 8. COMPARISON If( $a == $b ){ … If( $a != $b ){ … If( $a === $b ){ … If( $a !== $b ){ … If( $a > $b ){ … If( $a < $b ){ … If( $a >= $b ){ … If( $a <= $b ){ …
  • 9. LOGICAL AND / OR If( $a === $b $c === $d){… If( $a === $b $c === $d){… If( ($a > $b) && ($c > $d) ){… and&& or||
  • 10. assingment • Mark Sheet • Even Numbers and Odd Numbers Series • Prime Number Series • Fibonacci Number Series • Generate Star Pyramid • electricity billing system

×