2 Changed y>10 to y>=10. Otherwise numbers containing 0's will go wrong (e.g., 106 yields 70). (Also added the word "arrays" because edit had to be at least 6 characters; I did it by edit, because I have not yet enough rep for an answer.)

# C

#include <stdio.h>

int main(void) {
int r = 0, x;
scanf("%d", &x);
while (x > 0) {
int y = x;
x = 0;
while (y >>= 10) { y -= 10; ++x; }
r = r*10 + y;
}
printf("%d\n", r);
}


No strings, modulusarrays, modulus or division. Instead, division by repeated subtraction.

# C

#include <stdio.h>

int main(void) {
int r = 0, x;
scanf("%d", &x);
while (x > 0) {
int y = x;
x = 0;
while (y > 10) { y -= 10; ++x; }
r = r*10 + y;
}
printf("%d\n", r);
}


No strings, modulus, or division. Instead, division by repeated subtraction.

# C

#include <stdio.h>

int main(void) {
int r = 0, x;
scanf("%d", &x);
while (x > 0) {
int y = x;
x = 0;
while (y >= 10) { y -= 10; ++x; }
r = r*10 + y;
}
printf("%d\n", r);
}


No strings, arrays, modulus or division. Instead, division by repeated subtraction.

1

# C

#include <stdio.h>

int main(void) {
int r = 0, x;
scanf("%d", &x);
while (x > 0) {
int y = x;
x = 0;
while (y > 10) { y -= 10; ++x; }
r = r*10 + y;
}
printf("%d\n", r);
}


No strings, modulus, or division. Instead, division by repeated subtraction.