Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to make sure input is integer c

#include <string.h>  

bool isNumber(string s) 
{ 
    for (int i = 0; i < strlen(s); i++) 
        if (isdigit(s[i]) == false) 
            return false; 
  
    return true; 
} 
 
PREVIOUS NEXT
Tagged: #input #integer
ADD COMMENT
Topic
Name
4+3 =