osmoses-jones said:
if (ages < 18){
System.out.println("you are too young to drive");
|
What country you from?
Well I am no programmer so my help might be useless. Try structuring it differently...
Code:
x = "drink"
y = "drive"
z = "retire"
if (ages < 18)
System.out.println("You cannot 'x', 'y', or 'z'. ");
}else if (ages >= 21){
System .out.println("You can 'x', 'y', but cannot 'z'. ");
}else if (ages >= 65){
System.out.println("You can 'x' 'y' and 'z'"); |
All the rest of the technicalities of the programming language I know nothing about, but that is the way I would structure it I guess.