Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Julia Lamar
- //11-4-15
- //SecToMin
- import java.util.Scanner;
- public class SecToMin
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner(System.in);
- System.out.print("How many seconds?");
- int seconds = input.nextInt();
- //calculations now...
- int minutes = seconds / 60;
- seconds = seconds % 60;
- //print out to show user
- System.out.print("That will be ");
- System.out.print(minutes +" minutes, and ");
- //watch your brackets... open and close.. its important
- System.out.println(seconds +" seconds");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement