Applying arrays and Functions..please help?!

Help Please
I was given an assignment today and I am at a total loss when it comes to where to even start. I missed the lecture where we were taught to use arrays so, I don't even have a bit of background information. If someone could help get me started, it would be greatly appreciated.




Project 6

Photochemical oxidants are one of the components of air pollution for which the federal government has established a clean-air standard.

Write a program that takes input of photochemical oxidant concentrations for each day of one month from an input file (photo.dat). Display the highest concentration recorded, calling function highest to find this value. After the highest has been found, prompt the user for entry of the clean-air standard and call another function to count how many days the photochemical oxidant concentration exceeded the standard.

Implementation:

Create photo.dat

80 83 79 180 190 200 220 220 200 200 198 225 199 183 160 119 162 180 122 121 121 119 80 83 79 119 121 121 122 119 103



Sample RUN:

How many days in the month? = > 30

Enter name of file => photo.dat

Echo file:

80 83 79 180 190 200 220 220 200 200 198 225 199 183 160 119 162 180 122 121 121 119 80 83 79 119 121 121 122 119


The highest reading recorded was 225 micrograms per meter cubed

What level is the federal standard? => 160

During this month, the federal standard for photochemical oxidants was exceeded on 13 days.
There are some pretty good C++ tutorials on this site right here.

In particular, there's one on arrays:

http://www.cplusplus.com/doc/tutorial/arrays/

That should help cover some of the ground that you missed. Although presumably, you have course textbooks that should also cover it.
Topic archived. No new replies allowed.