Thread: Help needed with a HW

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    5

    Help needed with a HW

    Hello, I got a question about a certain program. I got a picture of it instead of looking and typing from the cygwin program (since it doesn't let you copy and paste without going thru a hassle).

    The question of the program is "Write a program to process a collection of daily high temperatures. Your program should count and print the number of hot days (high temperature 85 or higher), the number of pleasant days (high temperature 60-84), and the number of cold days (high temperature less than 60). It should also display the category of each temperature. Test your program on the following data."

    [img=http://img94.imageshack.us/img94/2931/temp2pic.th.jpg]

    It's not working out but the way I'm doing it is really not working. Is there a way to do this with just loops or something, and not arrays?

    Thanks!

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Yes, in that arrays are completely inappropriate for this problem. You need to count the number of hot days, the number of pleasant days, and the number of cold days.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free needed or not?
    By quantt in forum Linux Programming
    Replies: 3
    Last Post: 06-25-2009, 09:32 AM
  2. Replies: 10
    Last Post: 12-05-2008, 12:47 PM
  3. C Programmers needed for Direct Hire positions
    By canefan in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 09-24-2008, 11:55 AM
  4. C++ help needed
    By Enkindu in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 08-31-2004, 11:24 PM
  5. semi-colon - where is it needed
    By kes103 in forum C++ Programming
    Replies: 8
    Last Post: 09-12-2003, 05:24 PM