Project : Conditional Logic

Using variables to make decisions.

Display a greeting, based on the time of day.
Use the if clause only.
Good Morning! Good Afternoon! Good Evening!
Generate a random number between 0 and 100.
Display whether the number is more or less than 50.
Use if and else clauses.
The randomly generated number is 72
The randomly generated number is `more` than 50
Create 2 random variables as numbers.
Output a result that compares the values as being equal or not.
Use if and elseif clauses.
$n1 = 4
$n2 = 1
The $n1 variable is higher than $n2 variable
Introducing the GLOBAL variable: $_GET
Use a language variable in the URL to output a phrase in different languages.
The default should be English.
Other languages should be available via a link.
Use a switch statement to output the correct language;

Switch Language : en fr de cy

The lazy dog jumped over the sleeping cat.
1