Question: Help Please. CSC 118: Programming Fundamentals Lab 5: Programming assignment Programming assignment 1 (If-then and if-then-else): Use the following shell program for this assignment //

Help Please.
 Help Please. CSC 118: Programming Fundamentals Lab 5: Programming assignment Programming

CSC 118: Programming Fundamentals Lab 5: Programming assignment Programming assignment 1 (If-then and if-then-else): Use the following shell program for this assignment // Progran Temperature reads in a temperature and prints an /I appropriate nessage. #include > temperature; TO BE FILLED IN return e; Exercise 1: Add five if-then statements to program Temperature (temperature.cpp) so that one of the following messages is printed based on the value of temperature Temperature > 90 o-90,> 80 Message Visit a neighbor Turn on air conditioning Do nothing Turn on heat Visit a neighbor 80,> 70 Run your program as many times as it takes to display each message exactly once. Which data values did you use? Exercise 2: Rewrite the program in Exercise I using nested logic (i.e. if-then-else where the else branch is an if statement). Rerun the program with the same data. Did you get the same answers? Explain. Turn in: Your answers and codes for Exercise 1 and Exercise 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!