0
   

Write a program on clearing Rectangles

 
 
Reply Sat 18 May, 2013 06:19 am
Write a program on clearing Rectangles, Java Programming
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 759 • Replies: 1
No top replies

 
AshwinJackson
 
  0  
Reply Mon 20 May, 2013 05:04 am
@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
0 Replies
 
 

Related Topics

Highlight and name the tense - Question by poolmaniac747
goodday - Question by goldarmier
Bacteria recovery - Question by micro14
math problem - Question by ramzan
Blacky test - Question by dette0108
utility/demand functions economics - Question by Dublinking
Western Civilization ( History) - Question by Omalinov96
Machiavellis's the prince help - Question by hgfghfg
Dimensions, Height - Yard, Wall - Question by Randy Dandy
Help with a grammar question - Question by gabistephens
 
  1. Forums
  2. » Write a program on clearing Rectangles
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 02/05/2025 at 06:56:35