457,906 Members | 1,715 Online Need help? Post your question and get tips & solutions from a community of 457,906 IT Pros & Developers. It's quick & easy.

# Maths assignment in c++

 P: 3 hey i got this assignment in maths.i really need help guys.the question is below.The program should: It first clears the screen and then displays the next 3 lines. a1x + b1y + c1y =d1 a2x + b2y + c2y =d2 a3x + b3y + c3y =d3 The user is then required to input the integer values for a, b, c, d and the required accuracy for which he wants the calculation. ( e.g. 3 decimal places etc.) The user is then required to select either (1) Gauss Jacobi. (2) Gauss Seidel. As final output the number of iterations performed and the correct value for x, y and z should be displayed. Oct 29 '06 #1
3 Replies

 Expert Mod 5K+ P: 8,949 OK you need to either produce some code or give an indication of what is stopping you producing some code. Nov 1 '06 #2

 P: 3 OK you need to either produce some code or give an indication of what is stopping you producing some code. yeah i need to produce some code,actually i need the program code so if uve got some clue plz help.i know that ive got to use for loops but dunno where.have u got any idea? Nov 4 '06 #3

 Expert Mod 5K+ P: 8,949 I know that ive got to use for loops but dunno where.have u got any idea? I see no reason why you'd need loops, you have 3 variable to find (x, y and z) and 3 equations. That makes it a simultaneous equation which does not require loops, you just need to slog you way through the algebra. So do you know how to solve simultaneous equations? If you can solve a simple version of your problem on paper you will find it hard to make the computer do it for you so if not read these. http://www.gcseguide.co.uk/simultaneous_equations.htm http://www.allaboutcircuits.com/vol_5/chpt_4/14.html Once you know how to solve a simultaneous equation on paper then you can think about writing a generaic solution that you computer will be able to use to solve any set of 3 equations (assuming that there is a solution). Nov 6 '06 #4 