Thread: test integer, float or not

  1. #1
    Unregistered
    Guest

    test integer, float or not

    I am just starting out in C. Can some one help me out? I need a statement that will test an entered number to determine if it is an integer or a float. I would appreciate if someone could at least point me in the right direction.

    Thanks, Ed B.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    You can decide what type of data is inputted. Just specify it in your scanf().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Float Function Issues
    By GCNDoug in forum C++ Programming
    Replies: 5
    Last Post: 10-29-2007, 03:25 PM
  2. modifying help plz ( int to float )
    By sh4k3 in forum C Programming
    Replies: 11
    Last Post: 06-29-2007, 06:46 AM
  3. Opengl walking leg animation
    By Bobby230 in forum C Programming
    Replies: 3
    Last Post: 03-05-2006, 03:41 PM
  4. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  5. Pointer
    By silicon in forum C Programming
    Replies: 2
    Last Post: 03-25-2004, 02:34 PM