daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main {
  2.     public static void main(String[] args) {
  3.         getPrice(34,4);
  4.     }
  5.  
  6.     private static void getPrice(int cost,int hour){
  7.         int price = 0;
  8.         int hours = 0;
  9.         if (cost>=8 && 7*hour<=60){
  10.             for (int i=0;i<30;i++){
  11.                 if (hours>=40){
  12.                     price+= (cost*1.5)*hour;
  13.                 }else
  14.                     price+= cost*hour;
  15.                 hours += hour;
  16.             }
  17.         }
  18.  
  19.         System.out.println(price + " $");
  20.     }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top