Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

What is ethics?

Answered: 1 week ago