Re: Help. Where is my error?



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.
.



Relevant Pages

  • Re: SAF true to form
    ... some sort of mystery ... It's called discipline, you should be grateful. ...
    (rec.sport.rugby.union)
  • Radio Times Spoilers - Week Beginning 13th July
    ... Clarrie tries to unravel the mystery. ... Matt digs deep into the past. ... David gets sent to the back of the queue. ...
    (uk.media.radio.archers)
  • Re: Help. Where is my error?
    ... >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 ...
    (comp.lang.c)
  • Re: Conundrum
    ... Rolf Osterndorff wrote: ... Shall I ask you riddles? ... Do you want to unravel a mystery? ...
    (alt.smokers.pipes)
  • Re: Van Aint The Man.......{SDC}
    ... release albums that NO ONE pays attention to ... is a mystery I've yet to unravel. ... Name me ONE song he's written since 1978! ...
    (rec.music.gdead)