import java.lancs.BasicIo; public class greetings_while_loop { public static void main (String[] args) throws Exception { System.out.println (); System.out.println ("Welcome to the greeting program"); int choice = 0; while (choice != -1) { System.out.println (); System.out.println ("Choose one of the following:"); System.out.println (); System.out.println (" 1. Greeting in English"); System.out.println (" 2. Greeting in French"); System.out.println (" 3. Greeting in Spanish"); System.out.println (" 4. Greeting in Urdu"); System.out.println (" 5. Greeting in Hindi"); System.out.println (); System.out.println ("-1. Quit"); System.out.println (); choice = BasicIo.readInteger (); System.out.println (); switch (choice) { case 1: System.out.println ("Hello"); break; case 2: System.out.println ("Bonjour"); break; case 3: System.out.println ("Ola"); break; case 4: case 5: System.out.println ("Salaam"); break; case -1: // nothing break; default: System.out.println ("Incorrect selection"); break; } } } }