So i have this loop the check user input:
int ch, num;
while ((ch = getchar()) != '\n')
{
if (isdigit(ch))
{
num = ch - 48;
}
}
So according this table:
Character Decimal Value
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57
I am using this way to get my number
: num = ch - 48
;
And if for example i want to multiple my number
by 10
?