You are to make a program which has a menu. The user is given the option to
Fantastic news! We've Found the answer you've been seeking!
Question:
- You are to make a program which has a menu. The user is given the option to choose 1 of 5 choices. The program is run according to which number is chosen.
- For choice #1, the user can calculate the average of 5 numbers after being prompted to enter in 5 numbers. Challenge: Give the option for the user to choose how many numbers they want to calculate the average for, and then find the average.
- For choice #2, the user will be given an option to dress according to the weather. The user will be prompted to enter in a temperature in °C, and then a corresponding message will be outputted. For example, if the weather is less than °0, the user will be told to wear a winter jacket, hat and gloves. If the weather is between °0 and °15, the user will be told to wear a fall jacket, a scarf and rain boots. If the weather is greater than °15, the user is told to wear a t-shirt, shorts and running shoes. Challenge: The user enters the temperature in °F and then converted to °C, and then the option is given for what to wear.
- For choice #3, the user will be asked to enter in a length and a width of a rectangle. The area is calculated and then outputted. Challenge: The user is given a choice for calculating the area of a rectangle, circle or triangle and then the user is asked input appropriate values.
- For choice #4, the user will be asked to enter in a degree in Celsius and then degrees Fahrenheit is calculated and outputted. Challenge: The user is given a choice to either convert from Celsius to Fahrenheit or vice versa. Then the appropriate values are calculated and outputted.
- For choice #5, the user is given a goodbye message before being given the option to exit. Challenge: The user is given the option to stay in the program or exit.
- Sample Output: Main Menu
- Please choose 1 of the 5 options below:
- Calculate the Average
- Weather Program
- Calculate the Area
- Convert between Celsius & Fahrenheit
- Exit the program
Related Book For
Posted Date: