Answers for "how to check if the input is int in c"

C
0

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; 
}
Posted by: Guest on December-21-2020

Code answers related to "how to check if the input is int in c"

Code answers related to "C"

Browse Popular Code Answers by Language