===========================================================================
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float l,b,r,ar,p,a,c;
cout<<"Enter length and breadth of a rectangle:- ";
cin>>l>>b;
ar=l*b;
p=2*(l+b);
cout<<"\n The Area of rectangle isÆ "<<ar<<"\n The perimetre of rectangle isÆ "<<p<<"\n\n Enter the radius of any circleÆ ";
cin>>r;
a=3.14*r*r;
c=2*3.14*r;
cout<<"\n The area of the circle isÆ "<<a<<"\n The circumference of circle isÆ "<<c;
getch();
}
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float l,b,r,ar,p,a,c;
cout<<"Enter length and breadth of a rectangle:- ";
cin>>l>>b;
ar=l*b;
p=2*(l+b);
cout<<"\n The Area of rectangle isÆ "<<ar<<"\n The perimetre of rectangle isÆ "<<p<<"\n\n Enter the radius of any circleÆ ";
cin>>r;
a=3.14*r*r;
c=2*3.14*r;
cout<<"\n The area of the circle isÆ "<<a<<"\n The circumference of circle isÆ "<<c;
getch();
}
===========================================================================
No comments:
Post a Comment