Guest User

Training comparison

a guest
Jun 17th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SeriousScaping{
  4.    
  5.   public static void main(String arg[]){
  6.       Scanner sc = new Scanner(System.in);
  7.       System.out.println("Xp/hr(method 1)?");
  8.       int xp1 = sc.nextInt();
  9.       System.out.println("Gp/xp(method 1)?");
  10.       double gp1 = sc.nextDouble();
  11.       System.out.println("Xp/hr(method 2)?");
  12.       int xp2 = sc.nextInt();
  13.       System.out.println("Gp/xp(method 2)?");
  14.       double gp2 = sc.nextDouble();
  15.       System.out.println("Goal xp gain?");
  16.       int xpn = sc.nextInt();
  17.       System.out.println("Gp/hr (primary money maker?)");
  18.       int gph = sc.nextInt();
  19.      
  20.       int time1 = xpn/xp1;
  21.       double tgp1 = (double)(xpn*gp1);
  22.       int time2 = xpn/xp2;
  23.       double tgp2 = (double)(xpn*gp2);
  24.      
  25.       System.out.println("Method 1: "+time1+" hours and "+tgp1/1000000+"M gold = "+(int)(tgp1/gph + time1)+" hours total");
  26.       System.out.println("Method 2: "+time2+" hours and "+tgp2/1000000+"M gold = "+(int)(tgp2/gph + time2)+" hours total");
  27.   }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment