System.out.println("Extra credit\nRe-enter number of seconds:"); int j = input.nextInt(); int i =(j/60); int k = (j%60); System.out.println(j+" seconds is " +i+" minutes and "+k+" seconds.");
Hi when i key in 30 for j the correct answer should be 30seconds is 0minutes and 0seconds.
However my above code gives me 30seconds is 0minutes and 30seconds.
What am i doing wrong?