'Visual Basic 2010 Array Initializers Arrays Module ExerciseSolution Sub Main() Dim symbols() As String = _ {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"} Dim units() As Integer = _ {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1} ' Dim value, index As Integer Do Do Console.WriteLine("Value ?") value = Console.ReadLine() Loop Until value < 4000 AndAlso value >= 0 For index = 0 To 12 Do While value >= units(index) Console.Write(symbols(index)) value -= units(index) Loop Next Console.WriteLine() Loop End Sub End Module 'Bezoek www.vbvoorbeelden.be voor meer Visual Basic voorbeelden. 'Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.