Question: Pls give me the script for this. Thanks. Exercise 3.1 This experiment is a simple introduction to if and if-else statements. You will recall from
Pls give me the script for this. Thanks. Exercise 3.1 This experiment is a simple introduction to if and if-else statements. You will recall from Exercise 2.2 of the previous lab in this course that the circumference c of an ellipse with radii a and b can be approximated using the following formula: a2 +b2 1. In your HOME directory on wormulon, create a subdirectory named Lab 3. Step into the Lab.3 subdirectory and make a file called ex1.cpp. In this file create a program that asks the user for the two radii of an ellipse, then calculates and displays the circumference of an ellipse containing the given radi. You may use the program that you created for Lab 2 as a starting point if you would like. If the user provides radii that specify a circle, your program must display a message indicating that the ellipsoid is in fact a circle. Your program must validate user input. For instance, if a user specifies a radius that is less than or equal to zero, your program should display a message indicating that the input is invalid and terminate. Please carefully consider all possible inputs and provide input validation that is sufficient to correctly solve the specified problem. You need not be concerned about units of measure for this exercise 2. Compile and test your program to ensure that it performs as specified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
