Re: Solve system of equation by Gaussian elimination
What is the use of fflush(stdin)?
can you explain for me? i don't really know about it, but I often seen it after the end of a loop..... nice.... 
Re: Solve system of equation by Gaussian elimination
Flushes the input buffer

Re: Solve system of equation by Gaussian elimination
yeah, I know about flushs the inputBuffer.
But, what I want to ask, "Why we must flush the inputBuffer? Is it important?". Coz I couldn't answert that question before, when my friend asked me.  Sorry if my English not that good:surprised 
Re: Solve system of equation by Gaussian elimination
At times the input buffer contains input for which some scanf /cin statements are skipped without asking for input and so its a god practice to flush it.

Re: Solve system of equation by Gaussian elimination
Nomination this Article for Article of the month  May 2009

Re: Solve system of equation by Gaussian elimination
Oh my god it really great.What about Eular's law?

Re: Solve system of equation by Gaussian elimination
shabbir,
I would NOT nominate this for Article of the Month... Reason Does not follow ANSI C int main void Should there be a requirement as such if you are going to nominate this.. And Code:
float coeff[N][N+1]={{4,2,1,11},{2,3,4,20},{3,5,3,22},}; 
Re: Solve system of equation by Gaussian elimination
:iagree: +1 JamC.

Re: Solve system of equation by Gaussian elimination
The code works in TurboC because my assignments wanted it to work in that compiler and that is the one used by my university and it does not matter if its nominated or not but my intentions were to share my code for members

Re: Solve system of equation by Gaussian elimination
Quote:
Quote:
fflush(stdin) to flush the input stream.This method is UNPORTABLE, and hence should be avoided !It will compile fine, but it's behavior is undefined on many C compilers. But, it can be used safely with output stream. To flush input stream, we can define something like : Code: C
and call it like : Code: C
:) 
All times are GMT +5.5. The time now is 04:06. 