Question: Task1: Write a C program that computes the surface area and volume of a cone in square cm and cubic cm respectively. The program has


Task1: Write a C program that computes the surface area and volume of a cone in square cm and cubic cm respectively. The program has the main function and two other functions getInput and computeResults. The getlnput function is used to prompt for and read the radius r and the length L of the slant side of the cone both in cm, it then returns these two values. The computeResults function receives the radius r and the length L of the slant side of the cone, it then returms the surface area and the volume of the cone Hint: IT hon Note: Your program must define a constant with a value of 3.141592 . The computeResults function must not contain scanf or printf statements; the printing of the results must be in the main function The main function must display an appropriate error message and terminate if the input is invalid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
