how to check if value can be an integer in c code example
Example: 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;
}