Computer Science, asked by swetha2006, 10 months ago

write a c++ program to find the area and perimeter of rectangle​

Answers

Answered by ishaansingh9752
5

Answer:

public class rect

{

public static void main (String args[])

{

int l=5'b=7;

int area =l*b;

System.out.println("area ="+area);

int pr=2(l+b);

S.o.pln("perimeter =" +pr);

}

}

Explanation:

Answered by ssara
23

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int l, b, area, perimeter;

cout<<"Enter the length of the rectangle";

cin>>l;

cout<<"Enter the breadth of the rectangle";

cin>>b;

area=l*b;

perimeter=2(l+b);

cout<<"area is:"<<area<<endl<<"perimeter is:"<<perimeter;

getch();

}

Similar questions