#include /* Another variation. If you give it a nine digit number, it will print out a 511 digit result with a special repeating pattern */ void thing(const int N) { const int Q = N / 10, R = N % 10; if (Q > 0) thing(Q); print(R); if (Q > 0) thing(Q); } void test_it() { print("type a number (or -1 to stop) "); const int x = read_int(); if (x != -1) { thing(x); print("\n"); test_it(); } } void main() { test_it(); }