test integer, float or not

This is a discussion on test integer, float or not within the C Programming forums, part of the General Programming Boards category; I am just starting out in C. Can some one help me out? I need a statement that will test ...

  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,789
    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, 04:25 PM
  2. modifying help plz ( int to float )
    By sh4k3 in forum C Programming
    Replies: 11
    Last Post: 06-29-2007, 07: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, 01:55 PM
  5. Pointer
    By silicon in forum C Programming
    Replies: 2
    Last Post: 03-25-2004, 02:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21