Write a program to display the area and perimeter of a rectangle

  • 2021-02-12

توصيف

(Area and perimeter of a rectangle) Write a program to display 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

perimeter=2*(width+height)

========================================

double area=4.5*7.9;
double perimeter=2*(4.5+7.9);
System.out.println("area of rectangle is : "+area);
System.out.println("perimeter of rectangle is : "+perimeter);

هل كان المحتوى مفيد؟

التعليقات

لاضافة سؤال أو تعليق على المشاركة يتوجب عليك تسجيل الدخول
تسجيل الدخول
محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...