I am getting syntax errors on my while loop and switch statement which I have not gotten before when using this syntax.
I have tried using various different formats for my loop and my switch statement. It still provides a syntax error The error message reads "Syntax error on token(s), misplaced construct(s)" and "Syntax error on token "case", assert expected".
Scanner input = new Scanner(System.in);
System.out.println("Please enter a number between 1 and 14. I will
then tell you the playing card assosiated with it.");
int x = intput.nextInt();
while(1<x<=14){
Switch(x){
case 1:
System.out.println("Your card is an Ace.");
break;
case 2:
System.out.println("Your card is a two.");
break;
case 3:
System.out.println("Your card is a three.");
break;
case 4:
System.out.println("Your card is a four.");
break;
case 5:
System.out.println("Your card is a five.");
break;
case 6:
System.out.println("Your card is a six.");
break;
case 7:
System.out.println("Your card is a seven.");
break;
case 8:
System.out.println("Your card is an eight.");
break;
case 9:
System.out.println("Your card is a nine.");
break;
case 10:
System.out.println("Your card is a ten.");
break;
case 11:
System.out.println("Your card is an Ace.");
break;
case 12:
System.out.println("Your card is a Jack.");
break;
case 13:
System.out.println("Your card is a Queen.");
break;
case 14:
System.out.println("Your card is a King.");
break;
}
System.out.println("Please enter a number between 1 and 14. I will
then tell you the playing card assosiated with it.");
x = input.nextInt();
}
}
}