Overflow
i*i
can overflow (given a pause every 24, it would take a lot of enters).
To prevent overflow, use a wider type for the multiplicaiton.
#include <inttypes<stdint.h>
// printf("%10d%10d\n", i, i*i);
printf("%10d %10lld\n", i, 1LL*i*i);
// or better
printf("%10d %10jd\n", i, (intmax_t)i*i);