generated html version of romd.cHOME

/* Roman Numeral dump of input */
#include "stdio.h"
char*hundreds[]={"","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","M"};
char*tens[]={"","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","C"};
char*ones[]={"","I","II","III","IV","V","VI","VII","VIII","IX","X"};
void proman(int c){
	int n;
	if(c==0){
		printf("N         ");
		return;
	}
	printf("%s%s%s%n",hundreds[c/100%10],
		tens[c/10%10],ones[c%10],&n);
	while(n++<10)putchar(' ');
}
int main(){
	int c;
	int ctr=0;
	proman(0);
	putchar(':');
	while((c=getchar())!=EOF){
		proman(c);
		ctr++;
		if(ctr % 4 == 0){
			putchar('\n');
			proman(ctr);
			putchar(':');
		}
	}
	putchar('\n');
	return 0;
}