Q:

(Area and perimeter of a rectangle) Write a program that displays the area and perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following formula:

0

(Area and perimeter of a rectangle) Write a program that displays the area and perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following formula:

area = width * height

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

/*
(Area and perimeter of a rectangle) Write a program that displays the area and
perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following
formula:
						area = width * height
*/
public class Exercise_01_09 {
	public static void main(String[] args) {
		System.out.println("Area = ");
		System.out.println(4.5 * 7.9);
		System.out.println("Perimeter = ");
		System.out.println((4.5 + 7.9) * 2);
	}
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now