Re: Help. Where is my error?



"Red Dragon" <tskhoon@xxxxxxxxxxxx> writes:

> >
> > You have been repeatedly asked not to post using HTML.
> > Please stop it. This is usenet, not some mailing list or forum.
[snip]
>
> Mr. Michael,
> I wish to apologize for causing you problem. I did not know I was causing a
> problem.
> 1. The dont understand the HTML thing. I did not use HTML. What I did was
> to copy from my Visual C++ platform and paste on the Outlook Express
> screen. With Mr. Skarmander's instruction, I have set the radio button to
> "Plain Text" on the Send Tab and thought the problem is solved. I have
> actually sent a copy of the outgoing mail to myself and I dont see any HTML
> thing on my screen on the returned copy. So I dont know what else to do.

I suggest trying a mail tool other than Microsoft Outlook Express.
Microsoft mail software is well known for behaving in ways that
can cause problems like this.

Probably what you're using to read news hides the HTML-ness
of what you're posting. FYI, here is what gets transmitted
(each line has '>->-> ' at the beginning). I expect you can
see why other people don't like reading postings like this.


>->-> From: "Red Dragon" <tskhoon@xxxxxxxxxxxx>
>->-> Subject: Re: Help. Where is my error?
>->-> Newsgroups: comp.lang.c
>->-> Date: Tue, 18 Oct 2005 20:43:20 +0800
>->-> Organization: TMnet Malaysia
References: <4353ae06_1@xxxxxxxxxxxxxx> <1129584706.068328.31530@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4354e645$1_2@xxxxxxxxxxxxxx>
Lines: 281
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000E_01C5D424.94159240"
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 218.111.62.120
X-Original-NNTP-Posting-Host: 218.111.62.120
Message-ID: <4354edf1_2@xxxxxxxxxxxxxx>
X-Trace: news.tm.net.my 1129639409 218.111.62.120 (18 Oct 2005 20:43:29 +0800)
Path: nntp-server.caltech.edu!hammer.uoregon.edu!news.glorb.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!uunet!spool.news.uu.net!ash.uu.net!news1.tm.net.my!not-for-mail
Xref: nntp-server.caltech.edu comp.lang.c:761878
>->->
>->-> This is a multi-part message in MIME format.
>->->
>->-> ------=_NextPart_000_000E_01C5D424.94159240
>->-> Content-Type: text/plain;
>->-> charset="iso-8859-1"
>->-> Content-Transfer-Encoding: quoted-printable
>->->
>->-> I have got all the results by using 2 scanf(). One is a dummy. I am =
>->-> also using double instead of float.=20
>->-> Below are the results. I am copying and paste from Notepad, so I hope =
>->-> I dont have HTML problem.=20
>->-> Regards,
>->-> Khoon
>->->
>->->
>->-> /* Roots of a Quadratic Equation.
>->-> 12.10.05 */
>->->
>->-> #include <stdio.h>
>->-> #include <stdlib.h>
>->-> #include <math.h>
>->->
>->-> int main (void)
>->->
>->-> {
>->-> int a; int b; int c; double x1; double x2; double E; int E1; double R; =
>->-> double I;double S;
>->-> char q; char Y;
>->->
>->-> printf ("Please key in the value of constant a,b and c for finding the =
>->-> roots of quadratic");
>->-> printf ("equation ax%c+bx+c=3D0 :",253);
>->-> scanf ("%d%d%d", &a,&b,&c);
>->-> =20
>->-> E =3D(b*b)-(4*a*c);
>->-> =20
>->-> if ( E > 0)=20
>->-> { =20
>->-> x1 =3D (float)(-b+sqrt(E))/(2*a);
>->-> x2 =3D (float)(-b-sqrt(E))/(2*a);
>->->
>->-> printf ("\nYour quadratic equation has two distinct real roots: =
>->-> x1=3D%1.6f ,x2=3D%1.6f",x1,x2);
>->-> }
>->-> =20
>->-> else if (E =3D=3D 0)=20
>->-> {
>->->
>->-> x1 =3D (float)(-b+sqrt(E))/(2*a);
>->-> =20
>->-> printf ("\nYour quadratic equation has two same: =
>->-> x1=3Dx2=3D%1.6f\n",x1);
>->-> }
>->-> =20
>->-> else=20
>->->
>->-> {
>->->
>->-> printf ("Your quadratic equation has two distinct imaginary roots. Do =
>->-> you want to know");
>->-> printf ("\nthe values of the imaginary roots (Y/N)?");
>->-> =20
>->-> scanf ("%c",&q); /* Dummy. The computer jumps this =
>->-> scanf() */
>->->
>->-> scanf ("%c",&q);
>->->
>->-> printf ("q =3D %c\n",q); /* Test statement*/
>->->
>->-> if ('Y'=3D=3Dq)
>->-> {
>->-> R =3D (float)-b/(2*a);
>->-> S=3Dabs(E);
>->-> S=3Dsqrt(S);
>->-> I =3D S/(2*a);
>->-> printf ("\nThe imaginary roots are:\n");
>->-> printf (" x1=3D%1.6f + %1.6fi , x2=3D%1.6f - %1.6fi\n",R,I,R,I);
>->-> }
>->-> else
>->-> printf ("Thank you for using this computer\n");
>->-> }
>->-> return 0;
>->-> }
>->->
>->-> /* RESULT
>->-> Please key in the value of constant a,b and c for finding the roots of =
>->-> quadratic
>->-> equation ax=B2+bx+c=3D0 :3 4 1
>->->
>->-> Your quadratic equation has two distinct real roots: x1=3D-0.333333 =
>->-> ,x2=3D-1.000000
>->-> Press any key to continue */
>->->
>->-> /*Please key in the value of constant a,b and c for finding the roots of =
>->-> quadratic
>->-> equation ax=B2+bx+c=3D0 :1 8 16
>->->
>->-> Your quadratic equation has two same: x1=3Dx2=3D-4.000000
>->-> Press any key to continue */
>->->
>->-> /*Please key in the value of constant a,b and c for finding the roots of =
>->-> quadrati
>->-> equation ax=B2+bx+c=3D0 :4 2 5
>->-> Your quadratic equation has two distinct imaginary roots. Do you want =
>->-> to know
>->-> the values of the imaginary roots (Y/N)?Y
>->-> q =3D Y
>->->
>->-> The imaginary roots are:
>->-> x1=3D-0.250000 + 1.089725i , x2=3D-0.250000 - 1.089725i
>->-> Press any key to continue*/
>->->
>->-> /*Please key in the value of constant a,b and c for finding the roots of =
>->-> quadratic
>->-> equation ax=B2+bx+c=3D0 :4 2 5
>->-> Your quadratic equation has two distinct imaginary roots. Do you want =
>->-> to know
>->-> the values of the imaginary roots (Y/N)?N
>->-> q =3D N
>->-> Thank you for using this computer
>->-> Press any key to continue*/
>->-> =20
>->->
>->-> ------=_NextPart_000_000E_01C5D424.94159240
>->-> Content-Type: text/html;
>->-> charset="iso-8859-1"
>->-> Content-Transfer-Encoding: quoted-printable
>->->
>->-> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>->-> <HTML><HEAD>
>->-> <META http-equiv=3DContent-Type content=3D"text/html; =
>->-> charset=3Diso-8859-1">
>->-> <META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
>->-> <STYLE></STYLE>
>->-> </HEAD>
>->-> <BODY bgColor=3D#ffffff>
>->-> <DIV><FONT face=3DArial size=3D2>I have got all the results by using 2=20
>->-> scanf().&nbsp; One is a dummy. &nbsp;I am also using double instead of =
>->-> float.=20
>->-> </FONT></DIV>
>->-> <DIV><FONT face=3DArial size=3D2>Below are the results.&nbsp; I am =
>->-> copying&nbsp; and=20
>->-> paste from Notepad, so I hope I dont have HTML problem. </FONT></DIV>
>->-> <DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
>->-> <DIV><FONT face=3DArial size=3D2>Khoon</FONT></DIV>
>->-> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
>->-> <DIV>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial size=3D2>&nbsp;<FONT =
>->-> color=3D#000080><STRONG>/*&nbsp;&nbsp;=20
>->-> Roots of a Quadratic Equation.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
>->-> 12.10.05&nbsp;=20
>->-> */</STRONG></FONT></FONT></DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 =
>->-> size=3D2><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>#include=20
>->-> &lt;stdio.h&gt;<BR>#include &lt;stdlib.h&gt;<BR>#include=20
>->-> &lt;math.h&gt;</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>int main=20
>->-> (void)</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>{<BR>&nbsp;int =
>->-> a; int b; int=20
>->-> c; double x1; double x2; double E; int E1; double R; double I;double=20
>->-> S;<BR>&nbsp;&nbsp;&nbsp; char q; char Y;</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp;printf =
>->-> ("Please key in=20
>->-> the value of constant a,b and c for finding the roots of=20
>->-> quadratic");<BR>&nbsp;&nbsp;&nbsp; printf ("equation ax%c+bx+c=3D0&nbsp; =
>->->
>->-> :",253);<BR>&nbsp;scanf ("%d%d%d", =
>->-> &amp;a,&amp;b,&amp;c);<BR>&nbsp;&nbsp;&nbsp;=20
>->-> <BR>&nbsp;&nbsp;&nbsp; E&nbsp; =
>->-> =3D(b*b)-(4*a*c);<BR>&nbsp;<BR>&nbsp;&nbsp; if ( E=20
>->-> &gt; 0) <BR>&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp; =
>->-> <BR>&nbsp;&nbsp;&nbsp; x1 =3D=20
>->-> (float)(-b+sqrt(E))/(2*a);<BR>&nbsp;&nbsp;&nbsp; x2 =3D=20
>->-> (float)(-b-sqrt(E))/(2*a);</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 =
>->-> size=3D2><STRONG>&nbsp;&nbsp;printf ("\nYour=20
>->-> quadratic equation has two distinct real roots: x1=3D%1.6f=20
>->-> ,x2=3D%1.6f",x1,x2);<BR>&nbsp;&nbsp; }<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; =
>->-> else if (E=20
>->-> =3D=3D 0) <BR>&nbsp;&nbsp; {</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080=20
>->-> size=3D2><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x1 =3D=20
>->-> (float)(-b+sqrt(E))/(2*a);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>->-> <BR>&nbsp;&nbsp; printf ("\nYour quadratic equation has two same:=20
>->-> x1=3Dx2=3D%1.6f\n",x1);<BR>&nbsp;&nbsp; }<BR>&nbsp; <BR>&nbsp;&nbsp; =
>->-> else=20
>->-> </STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp;&nbsp;=20
>->-> {</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp; printf =
>->-> ("Your=20
>->-> quadratic equation has two distinct imaginary roots.&nbsp; Do you want =
>->-> to=20
>->-> know");<BR>&nbsp; printf ("\nthe values of the imaginary roots=20
>->-> (Y/N)?");<BR>&nbsp;<BR>&nbsp; scanf=20
>->-> ("%c",&amp;q);</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
>->-> bsp;&nbsp;&nbsp;&nbsp;=20
>->-> &nbsp;<FONT color=3D#008080><STRONG>/*&nbsp;Dummy. &nbsp;The computer =
>->-> jumps this=20
>->-> scanf() */</STRONG></FONT></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp; scanf=20
>->-> ("%c",&amp;q);</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp; printf =
>->-> ("q =3D=20
>->-> %c\n",q<FONT color=3D#008080>)<FONT=20
>->-> color=3D#000080>;&nbsp;</FONT>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;/* Test=20
>->-> statement*/</FONT></STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>&nbsp; if =
>->-> ('Y'=3D=3Dq)<BR>&nbsp;=20
>->-> {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R =3D=20
>->-> (float)-b/(2*a);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
>->-> S=3Dabs(E);<BR>&nbsp;&nbsp;=20
>->-> S=3Dsqrt(S);<BR>&nbsp;&nbsp; I =3D =
>->-> S/(2*a);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf=20
>->-> ("\nThe imaginary roots are:\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
>->-> printf ("=20
>->-> x1=3D%1.6f + %1.6fi , x2=3D%1.6f - %1.6fi\n",R,I,R,I);<BR>&nbsp; =
>->-> }<BR>&nbsp;=20
>->-> else<BR>&nbsp;&nbsp; printf ("Thank you for using this=20
>->-> computer\n");<BR>}<BR>&nbsp; return 0;<BR>}</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>/* =
>->-> RESULT<BR>Please key in=20
>->-> the value of constant a,b and c for finding the roots of =
>->-> quadratic<BR>equation=20
>->-> ax=B2+bx+c=3D0&nbsp; :3 4 1</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>Your quadratic =
>->-> equation has=20
>->-> two distinct real roots: x1=3D-0.333333 ,x2=3D-1.000000<BR>Press any key =
>->-> to continue=20
>->-> */</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>/*Please key in =
>->-> the value of=20
>->-> constant a,b and c for finding the roots of quadratic<BR>equation=20
>->-> ax=B2+bx+c=3D0&nbsp; :1 8 16</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>Your quadratic =
>->-> equation has=20
>->-> two same: x1=3Dx2=3D-4.000000<BR>Press any key to continue =
>->-> */</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>/*Please key in =
>->-> the value of=20
>->-> constant a,b and c for finding the roots of quadrati<BR>equation=20
>->-> ax=B2+bx+c=3D0&nbsp; :4 2 5<BR>Your quadratic equation has two distinct =
>->-> imaginary=20
>->-> roots.&nbsp; Do you want to know<BR>the values of the imaginary roots=20
>->-> (Y/N)?Y<BR>q =3D Y</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>The imaginary =
>->-> roots=20
>->-> are:<BR>x1=3D-0.250000 + 1.089725i , x2=3D-0.250000 - 1.089725i<BR>Press =
>->-> any key to=20
>->-> continue*/</STRONG></FONT></DIV>
>->-> <DIV><FONT color=3D#000080><STRONG></STRONG></FONT>&nbsp;</DIV>
>->-> <DIV><FONT face=3DArial color=3D#000080 size=3D2><STRONG>/*Please key in =
>->-> the value of=20
>->-> constant a,b and c for finding the roots of quadratic<BR>equation=20
>->-> ax=B2+bx+c=3D0&nbsp; :4 2 5<BR>Your quadratic equation has two distinct =
>->-> imaginary=20
>->-> roots.&nbsp; Do you want to know<BR>the values of the imaginary roots=20
>->-> (Y/N)?N<BR>q =3D N<BR>Thank you for using this computer<BR>Press any key =
>->-> to=20
>->-> continue*/<BR>&nbsp;&nbsp; <BR></STRONG></FONT></DIV></BODY></HTML>
>->->
>->-> ------=_NextPart_000_000E_01C5D424.94159240--
>->->
.