Fill This Form To Receive Instant Help
Homework answers / question archive / Writing C code: program must take a floating-point value and shape (Circle - 1, Triangle - 2) as input and return the circumference/perimeter and area of the shape
Writing C code:
program must take a floating-point value and shape (Circle - 1, Triangle - 2) as input and return the circumference/perimeter and area of the shape. Assume the floating-point value units are meters and the triangle is an equilateral triangle.
Suppose your floating-point value = 10.34, shape = 2, your output must be:
The perimeter of the triangle with side = 10.34 meters is 31.02 meters.
The area of the triangle with side = 10.34 meters is 46.3 square meters.
Suppose your floating-point value = 5.6, shape = 1, your output must be:
The circumference of the circle with radius = 5.6 meters is 35.19 meters.
The area of the circle with radius = 5.6 meters is 98.52 square meters.