Question: Write a complete Ct+ program to calculate and display the volume of shape. The program will prompt the user to choose the shape according to
Write a complete Ct+ program to calculate and display the volume of shape. The program will prompt the user to choose the shape according to Table 1 . Then, it will ask the user to input the appropriate value and calculate the volume. Hint: volume of cube- (side length) 3 volume of rectangular = length * width " helght volume of triangular =(1/2) * base height = lenoth Table 1: Shape You are required to use following user-defined function in your program: doutle-cute it: if To dalculate the volute of cube. doable tectangulat ( is ff To colculate the voluse of rectasgular, double craangutar ( )i fo calculate the volune of triangular. [25 Mark]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
