Re: Help. Where is my error?
- From: Michael Mair <Michael.Mair@xxxxxxxxxxxxxxx>
- Date: Mon, 17 Oct 2005 17:11:15 +0200
Red Dragon wrote:
I am self study C student. I got stuck in the program below on quadratic equation and will be most grateful if someone could help me to unravel the mystery.
Why does the computer refuse to execute my * scanf ("%c",&q); *
On input 3 4 1 (for a,b and c) I had real roots OK
On input 1 8 16 I had same real roots OK.
However on 4 2 5, (for imaginary roots ) the computer cannot see the *scanf ("%c",&q);* statement. It just jumps over it.
How can I make the computer not to ignore this statement? I am on Visual C++ platform.
Thanks
Khoon.
<snip!>
You have been repeatedly asked not to post using HTML. Please stop it. This is usenet, not some mailing list or forum.
Read the FAQ on input using scanf() -- it is not advisable. At all.
Apart from that: You did not look at the return value of scanf() so how do you know what happened? You also seem not to have used the debugger which comes with your IDE.
-Michael -- E-Mail: Mine is an /at/ gmx /dot/ de address. .
- Follow-Ups:
- Re: Help. Where is my error?
- From: Red Dragon
- Re: Help. Where is my error?
- References:
- Help. Where is my error?
- From: Red Dragon
- Help. Where is my error?
- Prev by Date: Re: cyclic doubly link list
- Next by Date: Re: Use of static ?
- Previous by thread: Re: Help. Where is my error?
- Next by thread: Re: Help. Where is my error?
- Index(es):
Relevant Pages
|