@Samharley,
#include <iostream.h>
#include <conio.h>
main(){
float a1,b1,a2,b2,s1,s2;
cout<<"Enter the lenght of the first rectangle:";
cin>>a1;
cout<<"Enter the width of the first rectangle:";
cin>>b1;
cout<<"Enter the lenght of the second rectangle:";
cin>>a2;
cout<<"Enter the width of the second rectangle:";
cin>>b2;
s1 = a1*b1;
s2 = a2*b2;
if (s1>s2) cout<<"First rectangle is larger than the second";
if (s1<s2) cout<<"Second rectangle is larger than the first";
if (s1==s2) cout<<"Rectangles has equal areas";
getch();
}
To learn how this program will run and details of thei program refer this link:-
Edit [Moderator]: Link removed