+ 3

Whats My Error?

public class Program { public static void main(String[] args) { System.out.println("Welcome, Put A Number Between 1-10 And If You Hit, Win 100XP Otherwise -100XP\n\n"); System.out.println("Number: \n\n"); Scanner in = new Scanner(System.in); int result = innextInt(); if(result==1) { System.out.println("\n\nFail! -100XP"); } else if(result==2) { System.out.println("\n\nFail! -100XP"); } else if(result==3) { System.out.println("\n\nYOU WIN! +100XP"); } else if(result==4) { System.out.println("\n\nFail! -100XP"); } else if(result==5) { System.out.println("\n\nYOU WIN! +100XP"); } else if(result==6) { System.out.println("\n\nFail! -100XP"); } (Continue Code...)

8th May 2019, 5:31 PM
zDev GameDev
zDev GameDev - avatar
1 Resposta
+ 2
Why you put C++ , C , JS tags when this is a Java question?
9th May 2019, 3:34 PM
Shahil Ahmed
Shahil Ahmed - avatar