1bool isNumber(char number[])
2{
3 int i = 0;
4
5 //checking for negative numbers
6 if (number[0] == '-')
7 i = 1;
8 for (; number[i] != 0; i++)
9 {
10 //if (number[i] > '9' || number[i] < '0')
11 if (!isdigit(number[i]))
12 return false;
13 }
14 return true;
15}