Re: Currency conversion program
- From: Barry Schwarz <schwarzb@xxxxxxxxx>
- Date: Mon, 05 Sep 2005 14:05:59 -0700
On 5 Sep 2005 11:54:12 -0700, "Just starting out"
<kelli.pitts@xxxxxxxxx> wrote:
>Flash,
>
>Thanks for your feedback!
>
>I'm using Miracle C compiler for my assignments.
>
>I'm not sure what you mean by ending the printf statement with a new
>line or flush stdout. I wanted the user input to appear at the end of
>the "Please enter a number: " line. I checked my book for flush stdout
>and it looks like I need a new book.
You have to provide some context. What code are you talking about.
The fact that the google interface is broken means you have to do it
manually.
The function you want is fflush. What book are you using?
>
>I replaced my original scanf with the "while(scanf..." code that
>kernelxu suggested. The two printf lines both print according to the
>number of letters the user enters. (ex. user enters STOP, the printf
>lines both print 4 times).
>
>Our class was told to use getch(); function in order to keep the window
I would be better if you were told to use a standard function like
getchar(). Not everyone has non-standard extensions like getch().
>from automatically closing. Maybe it's a Miracle C thing.
No, it's a Windows thing. When main() returns, your window may close
before you can see its contents. Putting a getchar() prior to the
return is intended to insure the window stays open until you hit Enter
signifying you are done looking.
<<Remove the del for email>>
.
- Follow-Ups:
- Re: Currency conversion program
- From: Keith Thompson
- Re: Currency conversion program
- References:
- Currency conversion program
- From: Just starting out
- Re: Currency conversion program
- From: kernelxu
- Re: Currency conversion program
- From: Flash Gordon
- Re: Currency conversion program
- From: Just starting out
- Currency conversion program
- Prev by Date: Re: Integer and character manipulation
- Next by Date: Re: Function pointer to void function and int function
- Previous by thread: Re: Currency conversion program
- Next by thread: Re: Currency conversion program
- Index(es):
Relevant Pages
|