N
news
Hi
I have problem:
My program reads 3 digits from keyboard using scanf("%d", &a)
then calculate it,everything is OK until I put "1,2,3,4,5,6,7,8,9,0"
but if I put "char " like "a,b,c,d etc" my program terminates
So,Is any method to verfity what kind of data is used(digits or chars)
if digits then OK if chars then show messege" use digits"
I'm beginer in C++
Michal
I have problem:
My program reads 3 digits from keyboard using scanf("%d", &a)
then calculate it,everything is OK until I put "1,2,3,4,5,6,7,8,9,0"
but if I put "char " like "a,b,c,d etc" my program terminates
So,Is any method to verfity what kind of data is used(digits or chars)
if digits then OK if chars then show messege" use digits"
I'm beginer in C++
Michal