Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TimeEstimation {
  4.  
  5.    public static void main (String[]args)
  6.    {
  7.       Scanner keyboard = new Scanner(System.in);
  8.      
  9.       System.out.println("Skriv in device kapacitet(gb): ");
  10.       int   kapacitet = keyboard.nextInt();
  11.             kapacitet = kapacitet*1000;
  12.    
  13.       System.out.println("Skriv in device hastighet(mb/s): ");
  14.       int   speed = keyboard.nextInt();
  15.      
  16.       int   time = kapacitet / speed;
  17.             kapacitet = kapacitet/1000;
  18.            
  19.       System.out.println(kapacitet + "gb kommer att ta: " + time + " sekunder(" + time/60 + "min) " + "att kopiera.");
  20.    
  21.    }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement