Home Answers Viewqa Java-Beginners one error but i dont know how to fix it o_O!!!

 
 


tofi
one error but i dont know how to fix it o_O!!!
1 Answer(s)      2 years and 3 months ago
Posted in : Java Beginners

where is the mistake here ??

import java.utill.Scanner; public class Time { public static void main (String [] args) {

    Scanner keyboard = new Scanner (System.in);
    System.out.println ("Enter Secends");
    int Secends = keyboard.next();
    int houres = Secends / 3600;
    int minutes = (Secends % 3600)/60;
    int newSecends = Secends - houres * 3600 + minutes * 60;
    System.out.println (Secends+"Secends have"+houres+"houres,"+minutes+"minutes and"+new Secends+"secends");
}

}

the compilar told me that there is only one error...

thx..,

View Answers

March 1, 2011 at 10:48 AM


import java.util.Scanner;
public class Time {
    public static void main (String [] args) {

    Scanner keyboard = new Scanner (System.in);
    System.out.println ("Enter Secends");
    int Secends = keyboard.nextInt();
    int houres = Secends / 3600;
    int minutes = (Secends % 3600)/60;
    int newSecends = Secends - houres * 3600 + minutes * 60;
    System.out.println (Secends+"Secends have"+houres+" houres,"+minutes+" minutes and"+newSecends+" secends");
}
}









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.