I think I would enter dat % 10 to get the 1st digit. (dat * .1) % 10 to get the 2nd digit and so on. Then do I use "if" to see what digit it is? After I get the digit, how would I put it back in...
Type: Posts; User: scatterice
I think I would enter dat % 10 to get the 1st digit. (dat * .1) % 10 to get the 2nd digit and so on. Then do I use "if" to see what digit it is? After I get the digit, how would I put it back in...
int dat;
printf( "\nEnter an int: " );
scanf( "%d", &dat );
printf( "\nThe counts of digits:\n0 %d\n"
"1 %d\n"
"2 %d\n"
"3 %d\n"
"4 ...
It asked to write a function displayDigit() that will ask the user for an integer. The function will then print out the 1-digit, 10-digit, and 100-digit. The function will also print the average
of...