#include <iostream>
using namespace std;
int area(int length, int breadth)
{
return length*breadth;
}
int perimeter(int length, int breadth)
{
int p = 2*(length*breadth);
return p;
}
int main()
{
int length = 0, breadth =0;
cout << "Enter length and breadth : ";
cin >> length >> breadth;
int a = area(length,breadth);
cout <<"Area is : "<<a << endl;
int peri = perimeter(length,breadth);
cout <<"perimeter is :"<<peri;
return 0;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter