User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 392,271 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,690 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:

New to C and needing some guidance

Join Date: Jul 2005
Posts: 1,095
Reputation: Lerner is a jewel in the rough Lerner is a jewel in the rough Lerner is a jewel in the rough Lerner is a jewel in the rough 
Rep Power: 9
Solved Threads: 141
Lerner Lerner is offline Offline
Veteran Poster

Re: New to C and needing some guidance

  #2  
Jul 6th, 2006
if ( ( sscanf(buffer, "%d", &currency) == 0) || 
       currency > 99999 || 
       currency < 1 )
{
    /////////////////////////////////////////////////////
    printf("\n\n\a       This is an Erroneous amount based on your input\n"); 

First I'd try placing an output statement to indicate the value of currency and buffer at the place where the /////////////////////////// is. If the values of currency and buffer aren't what you expect, then track down why not.
Reply With Quote  
All times are GMT -4. The time now is 8:07 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC