Do while loop practice Java
Hello again... next code I stuck and can’t find out what’s wrong is import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int number = scanner.nextInt(); //take input and output corresponding message /* 1 => Language selection 2 => Customer support 3 => Check the balance 4 => Check loan balance 0 => Exit */ do { if(number==1){ System.out.println("Language selection"); } else if (number==2){ System.out.println("Customer support"); } else if (number==3){ System.out.println("Check the balance"); } else if (number==4){ System.out.println("Check loan balance"); } } while (number != 0); System.out.println("Exit"); } } When I run the tests I get >> Execution timed out ! Thank you for your help