View Single Post
Old Feb 18th, 2005, 4:59 AM   #10
hipolito
Programmer
 
Join Date: Feb 2005
Posts: 41
Rep Power: 0 hipolito is on a distinguished road
Well here it goes!

This is what I did:

void routine()
char value;
printf("\nEnter a value: ");
scanf("%d", &value);
if (isalpha(ponto))
printf("\nLetter");
else
printf("\nNumber");
os_exit(0);

Just what Infinite did, well even letter or a number shows Number on my screen... I guess difining it as char, whaever I type will aways be a string...

and Hockeyman, the program compiles just well, and the error shown is when I define the value as int and type a letter... so I must use the "%d" on scanf to get it work for both letters and number, but still the if clause will always go on ELSE option...
hipolito is offline   Reply With Quote