Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hw_1;
- import java.util.Scanner;
- public class hw_01 {
- public static void main(String[] args) {
- Scanner user_input = new Scanner( System.in );
- String name;
- System.out.print("enter name: ");
- name = user_input.next();
- String email;
- System.out.print("enter email adress: ");
- email = user_input.next();
- System.out.println(name + " " + email);
- user_input.close();
- Scanner scanner = new Scanner( System.in );
- double size;
- System.out.print("enter size ");
- size = scanner.nextInt();
- double p1;
- p1 = size * 420;
- double ADRB15; //Anzahl der Räume bis 15m²//
- System.out.print("Anzahl der Räume bis 15² eingeben: ");
- ADRB15 = scanner.nextInt();
- double p2;
- p2 = ADRB15 * 1740;
- double ADRB25; //Anzahl der Räume bis 25m²//
- System.out.print("Anzahl der Räume bis 25² eingeben: ");
- ADRB25 = scanner.nextInt();
- double p3;
- p3 = ADRB25 * 1140;
- double ADRB40; //Anzahl der Räume bis 40m²//
- System.out.print("Anzahl der Räume bis 40m² eingeben: ");
- ADRB40 = scanner.nextInt();
- double p4;
- p4 = ADRB40 * 740;
- scanner.close();
- double summe;
- summe = p1 + p2 + p3 + p4;
- double endpreis;
- endpreis = summe * 1.2;
- System.out.print(endpreis);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement