Where to Start?

This is a discussion on Where to Start? within the C++ Programming forums, part of the General Programming Boards category; I have to write this program for my class, I haven't used c++ in awhile, and I have no idea ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    2

    Where to Start?

    I have to write this program for my class, I haven't used c++ in awhile, and I have no idea where start, is there anyone that help start it off.

    Write a program that uses a structure to store the following weather data for a particular month:
    Total rainfall
    High temperature
    Low temperature
    Average temperature
    The program should have an array of 12 structures to hold weather data for an entire year. When the program runs, it should ask the user to enter data for each month. (The average temperature should be calculated.) Once the data is entered for all the months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, the highest and lowest temperatures for the year (and the months they occurred in), and the average of all the monthly average temperatures.
    Input Validation: Only accept temperatures within the range between -100 and +140 degrees Fahrenheit.

    Please follow the general programming procedure.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Think about the information your prog needs to store, and what type of variables you'd use to store it in. Then think about how that would be used in an array of structs.

    Think about how to get input from the user, safely.

    etc etc....

    What part are you having problems with? I suggest you post some code so we can see where you're up to.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Break it down into parts.

    1) Create the struct that is going to hold the data
    2) Have the user input the info
    etc....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 02:30 PM
  3. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 11:48 PM
  4. GNOME Desktop won't start (Mandriva)
    By psychopath in forum Tech Board
    Replies: 10
    Last Post: 07-19-2006, 02:21 PM
  5. Start bar color in WinXP
    By confuted in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21