Question: Implement a menu driven program that finds the area and/or perimeter of a square, circle, or triangle by using two functions(area and perimeter). Function prototypes
Implement a menu driven program that finds the area and/or perimeter of a square, circle, or triangle by using two functions(area and perimeter). Function prototypes and menu options are detailed below. Implement these functions: double area(char shape, int si, int s2) double perimeter (char shape, int s1, int s2, int s3); Sample Output: A: Circle B: Square C: Triangle Enter Which Shape to use: A r P for solve for perimeter and A fors for Area Choice: P Enter circle radius: 2 Circle perimeterr is: Data Type Requirement: Input data is of type char for the shape, char for function choice, int for the side or radius, and output of perimeter or area is a double. Input Validation: Valid menu choice for shape and calculation and any integer greater than 0 for size. 0 is considered invalid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
