#include <unistd.h>
#include <stdio.h>
int digi_slice(int n)
{
int accu;
int digit;
accu = n -( n%10 );
digit = n - accu;
return digit;
}
int chop_down(int n)
{
n = n/10;
return n;
}
int count_digits(int number)
{
if(number/10 == 0)
{
return 1;
}
return 1 + count_digits(number/10);
}
int stripper(int n)
{
int accu;
while( count_digits(n) > 1)
{
int accu;
digi_slice(n);
accu = chop_down(n);
}
}
int main() {
int a;
int b;
int accu;
int digit;
a = 198;
b = 2024;
printf("number of digits in 9876 = %d\n", count_digits(b));
//printf("digit set to a - accu = %d \n", digit);
//printf("digi_slice(9876) returns %d \n", digi_slice(9876));
//printf("chop_down(9876) returns %d \n", chop_down(9876));
printf("sizeof string %long", sizeof("abcdefghijklmnop")-1);
int cnt;
cnt = 0;
while (str)
//printf("Ones column = %d", a);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: