#include /* a variation on the repetition theme allows convenient interactive testing */ void thing(const int N) { const int Q = N / 10, R = N % 10; print(R); if (Q > 0) thing(Q); print(R); } 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(); }