af 10 cout Solutioninclude using namespace std int main int
Solution
#include<bits/stdc++.h>
using namespace std;
int main()
{
int length;
int width;
int area;
int* lengthPtr;
int* widthPtr;
cout<<\"Please input the length of rectangle\"<<endl;
cin>>length;
cout<<\"Please input the width of rectangle\"<<endl;
cin>>width;
/* Fill in the blanks are given below */
lengthPtr=&length;
widthPtr=&width;
area=(*lengthPtr)*(*widthPtr);
cout<<\"The area is \"<<area<<endl;
if(*lengthPtr>*widthPtr)
cout<<\"length is grater than width\"<<endl;
else if(*lengthPtr<*widthPtr)
cout<<\"width is grater than length\"<<endl;
else
cout<<\"the width and length are the same\"<<endl;
return 0;
}
output:
Please input the length of rectangle
10
Please input the width of rectangle
15
The area is 150
width is grater than length
