suppose that each of the four edges of a thin metal plate is maintained at a constant temperature and that we wish to detrmine the steady state temperature at each interior point . to do this we divide the plate to squares the corners of which are called nodes. and find the temperature at each interior node by averaging the four neighboring temperatures that is if T(ij) denotes the old temp at the node in i ro and j coloumn.

the Eqn. is ( T(i-1,j) +T(i,j-1) + T(i,j+1) + T(i+1,j) )/4

< the i and j are the indexes>
we use a two deminsional array each array element represents the temp at each node
they want a program that reads the temps along the four edges , and use these values to initialize the array.
and then averaging the temp at each node from its four neighboirous then print the array elemnts.
plzzzzzzzzz sombody help me with this ASAP cuz it makes me mad as hell not be able to solve any problem cuz i dont understand the question.
thnx everybody fo ur responses =>

should i allocate a dynamic array with the new int
i tried ((( int *ptr = new [j] )))
but it genrated an error,,, or should I just make a 2-d regular array
array = [3][3]

I dont know where to start first in the plate
and the assigment says i should write a program that reads the four temps alonge the edges and some guess of the temps at the iterior points and use these values to intilize the elments of the array with these values.\

if u can help with this program and maybe showing me how to write the for loop to get the results ill be grateful
-should i make any assumptions for the program on my own or it doesnt need any??!!

plzzzzzzzzz guys any one can help me with understanding how this program works i will be soo gratfull... thnx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.