Thanx Brett! What you say is correct. I initially put that in to take away the Carriage Return + Line Feed, but I ought to assign it to a variable, like Thomas suggested. Thanks a million!
Paul C --- In [email protected], "Brett McCoy" <[EMAIL PROTECTED]> wrote: > > On Mon, Nov 17, 2008 at 8:56 PM, boogiebehometh > <[EMAIL PROTECTED]> wrote: > > > Basically, I scan in a number & print it to screen - large numbers > > become slightly smaller & small numbers become 10. > > > > 200 becomes 10 > > 2000 becomes 1802 > > 20000 becomes 19978 > > 200000 becomes 199946 > > > > I'm using the Dev C++ Compiler Version 4.9.9.2 > > unsigned long is shown here, but i get the same results with int & > > long... > > > > Here's the code: > > > > #include <stdio.h> > > #include <string.h> > > > > int l; > > int main () > > { > > int l; > > unsigned long trTime=0, trTime2=0, step=0; > > > > printf("\nEnter Transition Time(%cs): ",230); > > scanf("%d",&trTime); > > scanf("%c"); > > printf("\nTransition time = %d%cs\n", trTime, 230); > > getchar(); > > return 0; > > } > > It works correctly if you remove the second scanf(). Not sure what > that is there for, but it doesn't do a darn thing (think about if you > used printf() with a format but no parameters for the format). > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi >
