Answer:
Using c++
Check the image for colors.
Step-by-step explanation:
#include <iostream>
using namespace std;
int main()
{
float length1,length2,width1,width2,area1,area2;
cout<<"length of Rectangle 1\n";
cin>>length1;
cout<<"\nwidth of Rectangle 1\n";
cin>>width1;
cout<<"\nlenght of Rectangle 2\n";
cin>>length2;
cout<<"\nwidth of Rectangle 2\n";
cin>>width2;
area1=length1*width1;
area2=length2*width2;
if (area1<area2)
{cout << "\nRectangle 2 has greater area";}
else {
if (area1>area2)
{cout << "\nRectangle 1 has greater area";}
else {cout << "\nAreas are the same";}
}
return 0;
}