tinyBas3 - Numerus

10 REM ** Roman Numerals Convertor **
20 CLS : PRINT "Numerus"
30 PRINT ""
40 PRINT "Convert Arab Numerals [0..9]"
50 PRINT "to Roman Numerals [IVXLCDM]."
60 PRINT "" 
70 PRINT "Input an integer number"
80 PRINT "(0 to exit):"
90 INPUT N
100 IF N=0 THEN END
110 Z=(N=(N\1))*(N<=4999999)
120 IF Z=0 THEN GOTO 90
130 PRINT "In Roman numerals, ";
140 PRINT N; : PRINT " is"
150 IF N<=4999 THEN P=N : L=60 : GOTO 200
160 P=N\1000 : L=170 : GOTO 200
170 PRINT ".M ";
180 P=N-(N\1000)*1000 : L=60

200 A=P-(P\10)*10
210 B=P-(P\100)*100-A
220 C=P-(P\1000)*1000-B-A
230 D=P-(P\10000)*10000-C-B-A
240 IF D=1000 THEN PRINT "M"; : GOTO 280
250 IF D=2000 THEN PRINT "MM"; : GOTO 280
260 IF D=3000 THEN PRINT "MMM"; : GOTO 280
270 IF D=4000 THEN PRINT "MMMM";
280 IF C=100 THEN PRINT "C"; : GOTO 370
290 IF C=200 THEN PRINT "CC"; : GOTO 370
300 IF C=300 THEN PRINT "CCC"; : GOTO 370
310 IF C=400 THEN PRINT "CD"; : GOTO 370
320 IF C=500 THEN PRINT "D"; : GOTO 370
330 IF C=600 THEN PRINT "DC"; : GOTO 370
340 IF C=700 THEN PRINT "DCC"; : GOTO 370
350 IF C=800 THEN PRINT "DCCC"; : GOTO 370
360 IF C=900 THEN PRINT "CM";
370 IF B=10 THEN PRINT "X"; : GOTO 460
380 IF B=20 THEN PRINT "XX"; : GOTO 460
390 IF B=30 THEN PRINT "XXX"; : GOTO 460
400 IF B=40 THEN PRINT "XL"; : GOTO 460
410 IF B=50 THEN PRINT "L"; : GOTO 460
420 IF B=60 THEN PRINT "LX"; : GOTO 460
430 IF B=70 THEN PRINT "LXX"; : GOTO 460
440 IF B=80 THEN PRINT "LXXX"; : GOTO 460
450 IF B=90 THEN PRINT "XC";
460 IF A=1 THEN PRINT "I"; : GOTO L
470 IF A=2 THEN PRINT "II"; : GOTO L
480 IF A=3 THEN PRINT "III"; : GOTO L
490 IF A=4 THEN PRINT "IV"; : GOTO L
500 IF A=5 THEN PRINT "V"; : GOTO L
510 IF A=6 THEN PRINT "VI"; : GOTO L
520 IF A=7 THEN PRINT "VII"; : GOTO L
530 IF A=8 THEN PRINT "VIII"; : GOTO L
540 IF A=9 THEN PRINT "IX";
550 GOTO L
