Check input!

This is a discussion on Check input! within the C Programming forums, part of the General Programming Boards category; Hello! i want to check, if the user gives the right type in the input. For example, i want to ...

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    22

    Check input!

    Hello!

    i want to check, if the user gives the right type in the input.

    For example, i want to increase a float variable, so i want the input to be a number and not a character.

    Code:
    printf("plZ Give a number: ");
    	
    do{
    	scanf("%d",&number);
    
    }while(>>> how can i check it??? <<<<<)

  2. #2

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    22
    thx! it was very usefull!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. allegro issues
    By mramazing in forum C++ Programming
    Replies: 1
    Last Post: 01-07-2009, 11:56 PM
  2. HELP!!!!emergency Problem~expert please help
    By unknowppl in forum C++ Programming
    Replies: 9
    Last Post: 08-21-2008, 07:41 PM
  3. Trouble with a lab
    By michael- in forum C Programming
    Replies: 18
    Last Post: 12-06-2005, 11:28 PM
  4. check if user input matches a word
    By fakebloo in forum C++ Programming
    Replies: 1
    Last Post: 12-05-2004, 07:12 PM
  5. writing/reading from file produces double results.
    By stumon in forum C Programming
    Replies: 4
    Last Post: 03-20-2003, 04:01 PM

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