C++ program that takes temperature as input

Assignment Help C/C++ Programming
Reference no: EM13936336

You are running a camp and must decide what activities to schedule. You decide to base the decision on the temperature measured in degrees Fahrenheit. If the temperature is above 85°, you schedule swimming. If the temperature is above 70° and less than or equal to 85°, you schedule baseball. If the temperature is above 32° and less than or equal to 70°, you schedule basketball. Finally, if the temperature is below 32°,you send everyone home.

Create a C++ program that takes temperature as input and provides as output your sports decision. Assume that temperatures are only expressed as integers. In the program, include 2 void functions titled getTemp and printActivity, each with an int argument.

- The function getTemp should have a Reference parameter that gets the temperature in getTemp and then passes the value back to be printed in main( ), and
- printActivity should have a Value parameter.

The function getTemp should prompt the user for the temperature in Fahrenheit, get the input from the user, and return to main( ) where it prints the temperature on the screen. The function printActivity should determine the activity and print it as output on the screen. Be careful and note that this problem requires you to input the temperature into getTemp and not directly into the main function.

Please provide .CPP file along with word file instructions.

Reference no: EM13936336

Questions Cloud

Understanding of all the aspects of strategic marketing plan : In the report you will need to demonstrate an understanding of all the aspects of Strategic marketing planning.
Draw a graph showing the trend of each variable using excel : In December 2014, the international price of oil has dropped to almost half of its level in June 2014. What do you think the expected impact of this drop on the US economy using the AD and AS model?
C++ program to calculate the temperature : Randomly generates the daily temperature (in F) of two cities A and B the month of July. The temperatures are integers in the range [60.. 90] and they are stored in two arrays tA and tB.
How do austin decision effect total surplus in kendallville : Austin Kendall, one of the residents of Kendallville, decides on his own to reduce his consumption of Zhlurp by one bottle. What happens to Austin's welfare (his consumer surplus minus the cost of pollution he experiences)? How does Austin's decis..
C++ program that takes temperature as input : Create a C++ program that takes temperature as input and provides as output your sports decision. Assume that temperatures are only expressed as integers. In the program, include 2 void functions titled getTemp and printActivity, each with an int ..
Microenvironmental factors affected target performance : Read the case "Target: From ‘Expect More' to ‘Pay Less'" on pages 103 to 105 of the textbook and prepare answers to the questions below. Do not answer the questions at the end of the case in the textbook 1. What microenvironmental factors have aff..
Why does le rozier sa established the subsidiary in china : Why do you think that Le Rozier SA established the subsidiary in China instead of Japan? Assume no major country risk barriers.
Determine the average number of probes that each search algo : Determine the average number of probes that each search algorithm took. Do these values represent the theoretical values? Print out the averages for the two searches and their theoretical values.
Describe legal issues in operation of international banking : Describe the legal and ethical issues in the operation of international banking and reflect on how these contributed to the downfall of the capital market and its effect it may have on investments in Costa Pobre.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Definition of two queues

Write a code in C language for the definition of two queues, one to hold the process in ready state and one to hold the process in waiting state.

  Nbspyou are to insert the missing code in the c program

nbspyou are to insert the missing code in the c program given for combinational equivalence checking. this program will

  Create a studentgrade class that includes two data members

Create a StudentGrade class that includes two data members: a student ID number and the student's score on a test. Both of these are integers. Include "get" and "set" member functions for each of the data members, plus a displayRecord method which ou..

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Write a function named sum-from-to that takes two integer

Write a function named "sum_from_to" that takes two integer arguments, call them "first" and "last", and returns as its value the sum of all the integers between first and last inclusive.

  Boolean expressions with while loops

These questions explore using boolean expressions with while loops. If you get confused by the output as you work through these questions, you should review those pages in your textbook, with special attention to the operators &&, ||, and !

  What is encapsulation

What is encapsulation

  Write a program that allows a salesclerk to enter an item

Write a program in C++ that allows a salesclerk to enter an item's price and the quantity purchased by a customer.

  Construct an er diagram

Finally, the company is required by its insurers to maintain a record of the position of each vessel; its port and date of departure, destination and estimated date of arrival; number of officers, total number on board, and total value of cargo ca..

  A c language program to implement the quicksort method

QUESTIONS:1. A c language program to implement the Quicksort method to sort a given data element list.2. A c language program to implement the Shortest Job First Algorithm method for CPU Scheduling of various process in   memory.

  Write a program to implement a menu driven application

Write a C or C++ program to implement a menu driven application which will maintain a list of car models, their price, name of the manufacturer, engine capacity etc., as a doubly linked list

  Variable of primitive type

What value is stored in ch by the following statement? ch = str.charAt(0); What value is stored in ch by the following statement? ch = str.charAt(10);

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd