Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class E01tekkingEquipment {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double alpinists = Double.parseDouble(scanner.nextLine());
- double carabiners = Double.parseDouble(scanner.nextLine());
- double ropes = Double.parseDouble(scanner.nextLine());
- double pikels = Double.parseDouble(scanner.nextLine());
- double carabinersPrice = 36;
- double ropesPrice = 3.60;
- double pikelsPrice = 19.80;
- double carabinersTotal = carabiners * carabinersPrice;
- double ropeTotal = ropes * ropesPrice;
- double pikelTotal = pikels * pikelsPrice;
- double total = alpinists * (carabinersTotal+ropeTotal+pikelTotal);
- double totalPlusVAT = ((total * 20)/100)+ total;
- System.out.printf("%.2f", totalPlusVAT);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment