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 27
The randomly generated number is `less` 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 = 5
$n2 = 5
The values are the same!
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

Ma`r ci ddiog neidio dros y gath yn cysgu.
1