3.33 LAB*: Program: Painting a wall
unknown
java
3 years ago
574 B
17
Indexable
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
double width = scnr.nextDouble();
double height = scnr.nextDouble();
double cost = scnr.nextDouble();
double area = width * height;
double paint_needed = area / 350.00;
int cans = (int)(Math.ceil(paint_needed));
double sales_tax = 0.07 * cost;
double total_cost = cost + sales_tax;
System.out.printf("Wall area: %.1f sq ft\n", area);
System.out.printf("Paint needed: %.3f gallons\n", paint_needed);
}
}
Editor is loading...