Salve a tutti, mi servirebbe la data in numeri romani, non so' da dove cominciare, il tutto in asp qualcuno se in grado puo' aiutarmi? grazie.
Salve a tutti, mi servirebbe la data in numeri romani, non so' da dove cominciare, il tutto in asp qualcuno se in grado puo' aiutarmi? grazie.
Solo l'anno?
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
esattamente![]()
WOW! Un bel esercizio.
a me così funziona...ho provato con un po' di date...codice:<% anno = 1563 romano = "" for i = 1 to anno\1000 romano = romano&"M" next anno = anno mod 1000 for i = 1 to anno\100 if anno\100 > 5 and anno\100 < 9 then romano = romano & "D" anno = anno - 500 elseif anno\100 > 0 and anno\100 < 4 then romano = romano & "C" anno = anno - 100 elseif anno\100 = 9 then romano = romano & "CM" Exit For elseif anno\100 = 4 then romano = romano & "CD" Exit For elseif anno\100 = 10 then romano = romano & "M" Exit For elseif anno\100 = 5 then romano = romano & "D" Exit For end if next anno = anno mod 100 for i = 1 to anno\10 if anno\10 > 5 and anno\10 < 9 then romano = romano & "L" anno = anno - 50 elseif anno\10 > 0 and anno\10 < 4 then romano = romano & "X" anno = anno - 10 elseif anno\10 = 9 then romano = romano & "XC" Exit For elseif anno\10 = 4 then romano = romano & "XL" Exit For elseif anno\100 = 4 then romano = romano & "C" Exit For elseif anno\100 = 4 then romano = romano & "L" Exit For end if next anno = anno mod 10 for i = 1 to anno if anno > 5 and anno < 9 then romano = romano & "V" anno = anno - 5 elseif anno > 0 and anno < 4 then romano = romano & "I" anno = anno - 1 elseif anno = 9 then romano = romano & "IX" Exit For elseif anno = 4 then romano = romano & "IV" Exit For elseif anno = 4 then romano = romano & "X" Exit For elseif anno = 4 then romano = romano & "V" Exit For end if next response.write "data= "&romano %>
dimmi se ti va...
Purtroppo bisogna imparare che il computer non sbaglia...fa solo quello che gli dici di fare
www.netpolaris.it
Bene grazieappena nel progetto arrivo in quel punto la provo e ti avviso se va'.
Intanto Grazie!!
usa questo...mi sono accorto di un paio di erroricodice:<% anno = 1956 mille = "M" cinquecento = "D" cento = "C" cinquanta = "L" dieci = "X" cinque = "V" uno = "I" romano = "" for i = 1 to anno\1000 romano = romano&"M" next anno = anno mod 1000 for i = 1 to anno\100 if anno\100 > 5 and anno\100 < 9 then romano = romano & "D" anno = anno - 500 elseif anno\100 > 0 and anno\100 < 4 then romano = romano & "C" anno = anno - 100 elseif anno\100 = 9 then romano = romano & "CM" Exit For elseif anno\100 = 4 then romano = romano & "CD" Exit For elseif anno\100 = 10 then romano = romano & "M" Exit For elseif anno\100 = 5 then romano = romano & "D" Exit For end if next anno = anno mod 100 for i = 1 to anno\10 if anno\10 > 5 and anno\10 < 9 then romano = romano & "L" anno = anno - 50 elseif anno\10 > 0 and anno\10 < 4 then romano = romano & "X" anno = anno - 10 elseif anno\10 = 9 then romano = romano & "XC" Exit For elseif anno\10 = 4 then romano = romano & "XL" Exit For elseif anno\10 = 10 then romano = romano & "C" Exit For elseif anno\10 = 5 then romano = romano & "L" Exit For end if next anno = anno mod 10 for i = 1 to anno if anno > 5 and anno < 9 then romano = romano & "V" anno = anno - 5 elseif anno > 0 and anno < 4 then romano = romano & "I" anno = anno - 1 elseif anno = 9 then romano = romano & "IX" Exit For elseif anno = 4 then romano = romano & "IV" Exit For elseif anno = 10 then romano = romano & "X" Exit For elseif anno = 5 then romano = romano & "V" Exit For end if next response.write "data= "&romano %>![]()
Purtroppo bisogna imparare che il computer non sbaglia...fa solo quello che gli dici di fare
www.netpolaris.it