Formula:
Perimeter of circle = 2*pi*r
Perimeter of rectangle = 2*(l+b)
Perimeter of triangle = (s1+s2+s3)
Enter the radius of the circle, length and breadth of the rectangle and three sides of the triangle as inputs. Calculate the perimeter by using formula and get the desired output.
Find the Perimeter of a Circle, Rectangle and Triangle
When you run the program, the output will be:
Enter Radius of Circle : 7Perimeter of Circle is 42.0Enter Length of Rectangle : 12Enter Breadth of Rectangle : 8Perimeter of Rectangle is 40.0Enter Length of First Side of Triangle : 25Enter Length of Second Side of Triangle : 6Enter Length of Third Side of Triangle : 8Perimeter of Triangle is 39.0
Post a Comment
Thank you for vising