![]() |
|
#1
|
|||
|
|||
i need help with a simple program!!Can someone please help me get started on my program. I have trouble with functions and function calls.
Can someone please even just do this for one of the variables so i can see how it should be set up? Here are the requirements: Create a simple weather station simulation with two features: The ability to record current weather conditions The ability to report current weather conditions The weather conditions that should be supported are: temperature (in degrees Farenheit) wind speed (in miles per hour) wind direction (see below for how you are to represent this) dewpoint (in degrees Farenheit) cloudiness rating (use a scale from 1 to 10 with 1 being clear and 10 being overcast) barometric pressure (in inches of mercury) General Specifications: When the program begins, the user should be prompted to enter all of the weather conditions. Employ reasonable error checking. For example, the dew point should be less than or equal to the temperature. For those conditions represented by a range, make sure the entry falls within the range. After the conditions have been entered, the conditions should be presented formatted in a reasonable manner. Use the following table as a guide to represent Wind Direction as a number between 0 and 7: 7 = NW 0 = N 1 = NE 6 = W 2 = E 5 = SW 4 = S 3 = SE Technical Specifications This program is worth 20 points. Implement the two features as two functions (8 points each, total 16 points): A single function to gather all weather conditions A single reporting function The main design decision you will have to make is to determine where it will be necessary to use reference variables in the function arguments in order to implement call by reference where appropriate. (2 point deduction for inappropriate use of reference variables) You will also have to determine whether the functions need to return values, and if so, what type. The main program just needs to call the two functions in order. (1 point) Calculate and display the relative humidity based on the temperature and dewpoint. You will have to find a formula for this. (1 point) Come up with a way to translate the cloudiness index into an English description (1 point) |
|||
|
#2
|
|||
|
|||
Re: i need help with a simple program!!Here is a simple function and a function call.
CPP / C++ / C Code:
|
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| little help with a simple program | patito | C++ Forum | 3 | 08-Sep-2005 08:40 |
| [TUTORIAL] Calling an external program in C (Linux) | dsmith | C Programming Language | 4 | 22-Apr-2005 13:30 |
| Help with simple math table program (was a SIMPLE program) | Bubba | C Programming Language | 3 | 09-Mar-2005 12:40 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The