Jump to content

Arrays in C++

Ultimate Assassin

I have to do this assignment for C++ class dealing with arrays and I cannot figure it out. Can anyone help me? Ill have a picture of the assignment attached.1307256974_c.JPG.66f02f7a1d9ee673bde3a52b32f58d54.JPG

Link to comment
Share on other sites

Link to post
Share on other sites

What part do you need help with? Obviously we can't give you the answer.

If you're interested in a product please download and read the manual first.

Don't forget to tag or quote in your reply if you want me to know you've answered or have another question.

Link to comment
Share on other sites

Link to post
Share on other sites

No, we're not doing your homework for you. At least start something and we'll tell you if something's wrong.

Ryzen 5 1600 @ 3.9 Ghz  | Gigabyte AB350M Gaming 3 |  PaliT GTX 1050Ti  |  8gb Kingston HyperX Fury @ 2933 Mhz  |  Corsair CX550m  |  1 TB WD Blue HDD


Inside some old case I found lying around.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Start writting the code and tell us where's the problem. That's the only way you'll learn something mate.

Link to comment
Share on other sites

Link to post
Share on other sites

Here's some pseudocode to get you started:

 

// include input/output stream
// include time.h or ctime so you can seed rand()

// main function

// seed rand()
// declare variables
//	multidimensional array, tuesday temperature, average noon temperature
//
// loop through the multidimensional array to assign all values
//	for each day 0-7
//		for each hour 0-24
//			assign random number from 50-80
// 
//  find tuesday's average temperature
//  loop through each hour on tuesday
//		add each temperature and divide by 24
//
//	find the average weekly noon temperature
//	loop through each day in array
//		add every temperature from noon and divide by 7

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×