If statements
Author |
Message |
Nikea8
|
Posted: Sat Apr 16, 2016 11:47 pm Post subject: If statements |
|
|
Hello. I wanna do an if/then statement. I want the user to input a number, and have an if statement saying that if the number is higher than 5 then it runs something different than if the inputed number is lower than 5. What code do I use for that? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Sun Apr 17, 2016 8:17 am Post subject: RE:If statements |
|
|
Maybe you could do something with the > and < operators. |
|
|
|
|
|
Zainabh
|
Posted: Sun Apr 17, 2016 7:03 pm Post subject: RE:If statements |
|
|
For example
var number:int
put "Please enter a number."
get number
if number>5 then
put "Hello"
else
put "Goodbye"
end if |
|
|
|
|
|
|
|