Program:-
#include<iostream>
using namespace std;
int main()
{
int a,b,area1,area2;
cout<<"Enter the length:";
cin>>a;
cout<<"Enter the breadth:"; cin>>b;
area1=a*a;
area2=a*b;
cout<<"area of square is:"<<area1<<endl;
cout<<"area of Rectangle:"<<area2<<endl;
return 0;
}
Output:-
No comments:
Post a Comment