Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ShivashkiTseh {
- public static void main(String[] args) {
- Scanner scanner=new Scanner(System.in);
- int tables=Integer.parseInt(scanner.nextLine());
- double lenght=Double.parseDouble(scanner.nextLine());
- double width=Double.parseDouble(scanner.nextLine());
- double square_side=lenght/2;
- double area_pokrivki=tables*(lenght+2*0.3)*(width+2*0.30);
- double area_square=tables*square_side*square_side;
- double price_dolars=area_pokrivki*7+area_square*9;
- double price_leva=price_dolars*1.85;
- System.out.printf("%.2f USD%n",price_dolars);
- System.out.printf("%.2f BGN%n",price_leva);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement