Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int timeOFrest = Integer.valueOf(sc.nextLine());
- double priceOFcards = Double.valueOf(sc.nextLine());
- double priceOFadventure = Double.valueOf(sc.nextLine());
- double priceOFcoffe = Double.valueOf(sc.nextLine());
- double pauseOFcoffe = timeOFrest - 5;
- double remainTimeOFday = 6;
- double timeOFbuyAdventure = 4;
- double freeTime = pauseOFcoffe - (remainTimeOFday+timeOFbuyAdventure);
- double moneyFORcards = priceOFcards*3;
- double moneyFORadventure = priceOFadventure*2;
- double allmoneyFORbuy = moneyFORcards+moneyFORadventure+priceOFcoffe;
- System.out.printf("%.2f\n",allmoneyFORbuy);
- System.out.printf("%.0f",freeTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement