Advertisement
nguyenvanquan7826

check_is_number

Apr 9th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. /* isalnum example */
  2. #include <stdio.h>
  3. #include <ctype.h>
  4. int main ()
  5. {
  6.   int i;
  7.   char str[]="c3po...";
  8.   i=0;
  9.   while (!isdigit(str[i])) i++;
  10.     printf ("The first %d characters are alphanumeric.\n",i);
  11.   return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement