Write a C program to perform the following using if else ladder or switch statements. 10 marks Note: Your ID and Name must be mentioned in comments. The program shall be solved either by using if else...


Write a C program to perform the following using if else ladder or switch statements. 10 marks<br>Note:<br>Your ID and Name must be mentioned in comments.<br>The program shall be solved either by using if else ladder or switch only. No marks will be awarded if the<br>problem is solved using any other technique.<br>Problem:<br>Read three positive numbers. Display menu as shown in the below output, read choice and perform the<br>required operation.<br>Formulas:<br>Right rectangular pyramid<br>Area, A = Vs(s - a)(s - b)(s - c)<br>%3D<br>Solve for volume -<br>where,<br>a + b + c<br>S =<br>lwh<br>V<br>%3D<br>3<br>Three Sample Outputs: [For reference only]<br>Enter values for 3 sides<br>Enter values for 3 sides<br>3.4<br>3.4<br>-2.1<br>2.7<br>1.65<br>Enter positive values<br>**** Select Anyone ***<br>Enter values for 3 sides<br>1. Volume of rectangular pyramid<br>3.2<br>2. Area of triangle<br>1.8<br>Other exit<br>2.4<br>---> Select your choice 1<br>**** Select Anyone ***<br>-> Volume is 5.049000<br>1. Volume of rectangular pyramid<br>2. Area of triangle<br>Other exit<br>---> Select your choice 4<br>Wrong choice<br>

Extracted text: Write a C program to perform the following using if else ladder or switch statements. 10 marks Note: Your ID and Name must be mentioned in comments. The program shall be solved either by using if else ladder or switch only. No marks will be awarded if the problem is solved using any other technique. Problem: Read three positive numbers. Display menu as shown in the below output, read choice and perform the required operation. Formulas: Right rectangular pyramid Area, A = Vs(s - a)(s - b)(s - c) %3D Solve for volume - where, a + b + c S = lwh V %3D 3 Three Sample Outputs: [For reference only] Enter values for 3 sides Enter values for 3 sides 3.4 3.4 -2.1 2.7 1.65 Enter positive values **** Select Anyone *** Enter values for 3 sides 1. Volume of rectangular pyramid 3.2 2. Area of triangle 1.8 Other exit 2.4 ---> Select your choice 1 **** Select Anyone *** -> Volume is 5.049000 1. Volume of rectangular pyramid 2. Area of triangle Other exit ---> Select your choice 4 Wrong choice

Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here