-
Lenguaje
FreeBasic/QBasic
-
Descripción
Leer un número entero positivo entre 1 y 99, y mostrar su equivalente en números romanos.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Dim digito As Integer, numero_arabigo As Integer
Input "Ingresa el valor de numero arabigo: ", numero_arabigo
digito=(numero_arabigo-numero_arabigo Mod 10)/10
If digito = 1 Then
Print "X"
End If
If digito = 2 Then
Print "XX"
End If
If digito = 3 Then
Print "XXX"
End If
If digito = 4 Then
Print "XL"
End If
If digito = 5 Then
Print "L"
End If
If digito = 6 Then
Print "LX"
End If
If digito = 7 Then
Print "LXX"
End If
If digito = 8 Then
Print "LXXX"
End If
If digito = 9 Then
Print "XC"
End If
digito=numero_arabigo Mod 10
If digito = 1 Then
Print "I"
End If
If digito = 2 Then
Print "II"
End If
If digito = 3 Then
Print "III"
End If
If digito = 4 Then
Print "IV"
End If
If digito = 5 Then
Print "V"
End If
If digito = 6 Then
Print "VI"
End If
If digito = 7 Then
Print "VII"
End If
If digito = 8 Then
Print "VIII"
End If
If digito = 9 Then
Print "IX"
End If
Print "Valor de digito: " & digito
Print
Shell ("pause")
Input "Ingresa el valor de numero arabigo: ", numero_arabigo
digito=(numero_arabigo-numero_arabigo Mod 10)/10
If digito = 1 Then
Print "X"
End If
If digito = 2 Then
Print "XX"
End If
If digito = 3 Then
Print "XXX"
End If
If digito = 4 Then
Print "XL"
End If
If digito = 5 Then
Print "L"
End If
If digito = 6 Then
Print "LX"
End If
If digito = 7 Then
Print "LXX"
End If
If digito = 8 Then
Print "LXXX"
End If
If digito = 9 Then
Print "XC"
End If
digito=numero_arabigo Mod 10
If digito = 1 Then
Print "I"
End If
If digito = 2 Then
Print "II"
End If
If digito = 3 Then
Print "III"
End If
If digito = 4 Then
Print "IV"
End If
If digito = 5 Then
Print "V"
End If
If digito = 6 Then
Print "VI"
End If
If digito = 7 Then
Print "VII"
End If
If digito = 8 Then
Print "VIII"
End If
If digito = 9 Then
Print "IX"
End If
Print "Valor de digito: " & digito
Shell ("pause")