this function should find out the first element of array is an interger or a character, then store that element to character named C. but it does not do that..
What can be wrong?
this is my input function
Code:
gets(userinput);
decodeinput(userinput);
here's decoding function
Code:
void decodeinput(char input[100])
{
int i;
char input3[100];
for(i=0; i<100; i++)
input3[i] = input[i];
strupr(input3); /* Make command to upper case */
if('0' < input[0] <'9')
num = input[0];
else if ('A' < input3[0] < 'Z')
{
c = input3[0];
printf("%c", c);
num = 0;
}