Cloudbook:
C
Home
Control
If/Else
§ 2
↵ lesson
← prev
next →
C-O-matic
If statement
Else statement
Foreach statment
If/Else
# Write the logical expression that # does the same thing as the if statement # example: if ( $i==0 ) { print "Hi! " ; } ( $i==0 ) && print "Hi! " ; # you do: if ( $i>7 ) { $i = 6 ; } # your logical expression here if ( "hi" eq $s ) { print "say $s!" ; } # your logical expression here ($i==0) || print "Hi!" ; # your if statement here
The output goes here