Thread: Decimal function

  1. #1
    Registered User
    Join Date
    Nov 2001

    Decimal function

    I need a function that allows a positive number with a decimal point, to be rounded up or down. For example:

    2.3 would be 2
    2.7 would be 3

    I also need a function that, when a user inputs 4 numbers, that the numbers are only allowed if they are positive. I have figured out how to have the user input 4 numbers but can't figure how to assure that they are positive and when they're aren't, an error message informs the user.

    Any help would be appreciated

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    just check the mantissa and reassign the number appropriately...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM