I am currently trying to count the digits of a number using getchar()
.
If i do it with getchar (condition to not count the point or comma) and I put a number like 345.234 does it count 6 like 3-4-5-2-3-4 or does it count 4 like 34-5-23-4?
i=0
while((c=getchar())!=',' && c!=EOF)
i++;
SIMPLE QUESTION HOW MUCH DOES IT COUNT 345.234 and ctrl+z on the input all at once Does it count 4 or does it count 6