i,j,k;main(n){for(;puts(""),++i<1001;)for(j=1e4,k=3;j/=10;)n=i/j%10,printf("%.*s",n%5-4?n>4?n-4:n:2,"IVIIIXLXXXCDCCCMMM"+k--*5+(n<4?2:n-9?n!=4:4));}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page