Cloudbook:
C
Home
Control
If/Else
§ 4
↵ lesson
← prev
C-O-matic
If statement
Else statement
Foreach statment
If/Else
# Study the example code. # Modify it to print "large", "medium", "small" or # "extra-small" depending on the value of $size. $size = 10 ; if ( $size > 15 ) { print "We don't carry that size." ; } elsif ( $size < 5 ) { print "Sorry, we just sold the last one." ; } else { print "We expect more of that size next week." ; }
The output goes here