a. Read in an initial temperature distribution from a file named initialtemps.txt. The format of the file is 6 rows of 8 numbers. Use one 2 dimensional array to store the temperatures.
b. Allow the user to modify the initial distribution, after it is read, by specifying new values for the points on the four sides of the grid (top, left, right, and bottom as shown above).
c. Compute the final temperature distribution by updating the temperatures at each point, moving across the rows until the temperature differences for all the updates are less than a tolerance value that the user is prompted to enter. When a point is updated, its new value should be used to update the next point. Print the final temperature distribution to the screen, with a descriptive header to include the number of iterations (updates of the entire grid) that were required to converge to the final distribution, in a 6 by 8 matrix format. Also, write the final distribution to a file named finaltemps.txt in the same matrix format, but with no other text, so that this file could be read back into the program if that was desired. Run this case for 3 values of tolerance that differ by at least one order of magnitude. Note the change in the number of iterations required for convergence as the tolerance values change and note these results in the header information documenting your program.
2. Modify the program from part 1 so that the updates are performed by marching down each column, one by one, instead of marching across each row.
3. Modify the program in part 1 so that two arrays are used and so that the program can perform the updates as if they all happen at the same time. Thus, all temperatures are updated using one set of array values. The two arrays are need so that all the old temperatures are available to compute the each new array. Compare the number of iterations required (for the same tolerance value) with the number required for convergence using the part 1 program, and note this comparison in the header documentation for part 3.
http://rapidshare.com/files/236479840/sar.c.html this is the link to my answer to part a number one this is the only one that is on my computer at home. The rest are at school. sorry.
Here is the txt file
http://rapidshare.com/files/236480294/initialtemps_1_.txt.html
i need the code by ten o clock tonight. I have a copy of the entire question with a picture you can upload it at rapid share
http://rapidshare.com/files/236488538/ceg.doc.html