Question: C language 5. Task 4: Using User-defined Functions with return statement Create a program that will use user-defined functions that return a value. NOTE: Create





C language
5. Task 4: Using User-defined Functions with return statement Create a program that will use user-defined functions that return a value. NOTE: Create a program that will compute for the area of square, rectangle, triangle and circle. Use user defined function for each shape. Any number divided by zero will result to undefined. Formulas: Square Area = 52 Rectangle Area =w*1 Triangle Area = (h* b)/2 Circle Area = TTr2 where: 1 = 3.1416 NOTE: Your source code must display any of the given sample output below. It means your source code should be flexible enough to meet any of the given sample output Your source code output must be identical to any of the given sample output. It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output. MK IR Sample OUTPUT 1 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle Option: 1 Side: 10 Area: 100 Sample OUTPUT 2 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle Option: 2 Length: 10 Width: 5 Area: 50 Sample OUTPUT 3 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle Option: 3 Base: 40 Height: 10 Area: 200 Sample OUTPUT 4 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle Option: 4 Radius: 20 Area: 1256.64
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
