Advertisement
simzlit

This calculates how many minutes are in the number of second

Sep 25th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.19 KB | None | 0 0
  1.  
  2. /*
  3.  * To change this license header, choose License Headers in Project Properties.
  4.  * To change this template file, choose Tools | Templates
  5.  * and open the template in the editor.
  6.  */
  7. package notes2;
  8.  
  9. /**
  10.  *
  11.  * @author similyhill
  12.  */
  13. import java.util.Scanner;
  14. public class notes2 {
  15.     public static void main (String[] args) {
  16.        
  17.         Scanner getSeconds = new Scanner(System.in);
  18.        
  19.         //we wnat to promt the user to enter info into the system
  20.        
  21.         System.out.print("enter an interger for seconds ---> "); //next we need to take in that int and store it into a variable.
  22.         int num = getSeconds.nextInt();  //this take the integer and stores it into
  23.        
  24.        
  25.         System.out.println("The number that you entered is " + num);//tells the user what the number is that they entered
  26.        
  27.         int minutes = 60;
  28.         System.out.println(" We will divide " + minutes + "seconds");
  29.        
  30.        
  31.         System.out.println(num / minutes + " Minutes in that amount of Seconds ");
  32.        
  33.         //close out your scanner
  34.        
  35.         getSeconds.close();
  36.        
  37.        
  38.        
  39.        
  40.        
  41.     }
  42.    
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement