Advertisement
SIRAKOV4444

Untitled

Mar 21st, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Exersice3{
  3. public static void main(String[]args){
  4. Scanner scanner=new Scanner(System.in);
  5.  
  6. double PriceRocket=Double.parseDouble(scanner.nextLine());
  7. int Rockets=Integer.parseInt(scanner.nextLine());
  8. int Shoes=Integer.parseInt(scanner.nextLine());
  9.  
  10. double PriceShoes=PriceRocket*(1/6);
  11. double TotalShoesPrice=PriceShoes*Shoes;
  12. double TotalRocketsPrice=PriceRocket*Rockets;
  13. double Equipment=(TotalShoesPrice+TotalRocketsPrice)*0.2;
  14. double TotalCoast=TotalShoesPrice+TotalRocketsPrice+Equipment;
  15.  
  16. double Djokovic=TotalCoast*0.125;
  17. double Sponsors=TotalCoast*0.875;
  18.  
  19. System.out.printf("Price to be paid by Djokovic");
  20. System.out.printf("Price to be paid by sponsors");
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement