FidoNet Echomail Archive

<<< Previous Index Next >>>

From: Paul Edwards
To: Frank Adam
Date: 1997-03-28 00:28:44
Subject: cprintf

FA> #include <conio.h>
FA> #include <stdio.h>

FA> char s[100];

FA> main()
FA> {
FA> int i =0;
FA> while(i < 5)
FA> {
FA> fgets(s,100,stdin);
FA> cprintf("%s\n\r",s);
FA> i++;
FA> }
FA> return 0;
FA> }

FA> This will print the entered text three times, why does it do that ?  

I just tried it here with BC++ 3.1, and it first of all echoed the string
that I echoed, as I would expect, and then it printed out the string, as I
expected, along with an extra blank line, as I expected (since there are
two \n's, one from the fgets, and one from the cprintf string).

I've no idea what whacky weed you're on.  :-)  BFN.  Paul.

 * Origin: X (3:711/934.9)