*i want the question to repeat but if the user entered -1 i want the program to stop ? *
public class Q2 {
public static void main (String [] args) {
int N ;
Scanner input = new Scanner (System.in) ;
System.out.println("Enter an integer to print it's multiplication table, -1 to exit ") ;
N = input.nextInt() ;
switch (N) {
case -1 : break ;
default :
for (int t=1 ; t <= N ; t++){
System.out.println (" Multiplication table of " + t );
for ( int i = 0 ; i <= 10 ; i++ ) {
System.out.println ( t + "*" + i + " = " + i*t + " ");}}}
}}