Monday, May 24, 2010

C Programming question?

I need help with my assignment? The assignment is to 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-85), and the number of cold days (high temperature less than 60). It should also display the category of each temperature.





I'm not a programming whiz and I know I have to use some kind of loop. I have a programming book on me I was just wondering if someone could point me in the right direction. Thanks a bunch!

C Programming question?
You're right about using a loop. Just look at some of the different types of looping structures and decide which one will work the best. Make sure you understand how each looping structure works, otherwise you'll run into problems later on down the road.
Reply:Why not pseudocode it out first, and post that here, and then we can offer pointers. When your pseudocode is right, you're overhalfway there and we can help with specific questions.





You'll get a lot of personal satisfaction in doing it yourself -- not to mention show that you've got a pair.


No comments:

Post a Comment