program help!!

Write a progam that crates a 2D array with 40 rows and 10 columns. Populate the array with random integers between 100 and 200. Output the values in row-by-row format. Without using any user-created functions or libraries, find the maximum value and the average. Ask the user to enter a search value. Again without using any user-created functions or libraries, search for the value and output a message indicating the number of times that the value exists in the array.

This is my extra credit assignment for my class, can anyone help me out? missed the lecture and professor does not post up notes.

Thanks in advance
Without using any user-created functions or libraries, find the maximum value and the average.
I think your professor wants you to use a vector... as far as I know normal arrays don't come with built-in functions. I'm assuming this is what he wants you to do because he said don't use any user-created functions?
Here are some pages you may find helpful:

http://www.cplusplus.com/doc/tutorial/basic_io/ - Getting and displaying user input

http://www.cplusplus.com/doc/tutorial/control/ - Programming logic

http://www.cplusplus.com/doc/tutorial/arrays/ - How to use arrays



@FSM

I too find it hard to understand, I would of thought they couldn't create functions and do it all in main using program flow.
u guys rock!! thanks for the help. Also professor said in next test we would have to use pointers with in a for loop.
Im new to the forum but are there any tutorials for this, our could u guys give me an example of what i could expect on a question like this?
1
2
3
4
5

     int fish = 0;
     int* fishPointer = &fish;
     cout << *fishPointer << " This is what the pointer points at." << endl;
     cout << fishPointer << " This is what the address is where our fish is in memory." << endl;
Last edited on
Topic archived. No new replies allowed.