c++ Find Area & Perimeter of Circle,Rectangle &Triangle


Find Area & Perimeter of Circle

Area of circle = πr²
Circumference of circle = 2πr   or   πd

Where, π = 3.14 or π = 22/7
r is the radius of circle  &   d is the diameter of circle

 Output of circle

Enter Radius : 2

Area:12.56

Circumference  of circle : 12.56


 

Find Area & Perimeter of Rectangle

Area of Rectangle = length + width
perimeter of Rectangle= 2 (length+width)

 Output of Rectangle

Enter length and width :

4  5

Area of Rectangle    : 20

Perimeter  of circle : 18


 

  Find Area & Perimeter  of TriAngle

Perimeter of triangle = side-1 + base + height

Area of triangle = 1/2 × base × height

 Output

Enter base and height and side-1

10  20   30

Area of Triangle  :  100

Perimeter  of Triangle  : 60

(Visited 53 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image