import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
int age;
Scanner input = new Scanner(System.in);
age = input.nextInt();
if(age>16){
System.out.println("get a job");
if(age>1
{
System.out.println("you are old enough to smoke weed now");
}
}
}
else
{
System.out.println("sorry mate u are to young 4 either one");
}
}
-
12-21-2017, 12:38 AM32Posts30ReputationMay 2017NextGenUpdate
-
12-21-2017, 02:43 AM32Posts30ReputationMay 2017NextGenUpdatei figured it out...heres the correct code
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
int age;
Scanner input = new Scanner(System.in);
age = input.nextInt();
if(age>16){
System.out.println("get a job");
if(age>1{
System.out.println("you are old enough to smoke weed now");
}
}
else
{
System.out.println("sorry mate u are to young 4 either one");
}
}
}