Advertisement
julial

Untitled

Nov 30th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. //Julia Lamar
  2. //11-4-15
  3. //SecToMin
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class SecToMin
  8. {  
  9. public static void main(String[] args)
  10. {
  11.   Scanner input = new Scanner(System.in);
  12.   System.out.print("How many seconds?");
  13.   int seconds = input.nextInt();
  14.   //calculations now...
  15.  int minutes = seconds / 60;
  16.  seconds = seconds % 60;
  17.  //print out to show user
  18.  
  19.   System.out.print("That will be ");
  20.   System.out.print(minutes +"  minutes, and ");
  21.   //watch your brackets... open and close.. its important
  22.   System.out.println(seconds +" seconds");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement