Option Strict On Imports System.Console Module Module1 Sub Main() Const heitot As Integer = 5 Dim pisteet(heitot - 1) As Integer Dim i, suurin As Integer Dim piste As String suurin = 0 For i = 1 To heitot Do Do WriteLine("Anna {0}. heittotulos: ", i) piste = CStr(ReadLine()) If IsNumeric(piste) = True Then If CInt(piste) <= 50 And CInt(piste) >= 0 Then pisteet(i - 1) = CInt(piste) If (CInt(piste) > suurin) Then suurin = CInt(piste) End If Else WriteLine("Pistemäärä pitää olla välillä 0-50") End If Else WriteLine("Tuloksesi pitää ilmoittaa numerona") End If Loop Until IsNumeric(piste) = True Loop Until CInt(piste) <= 50 And CInt(piste) >= 0 Next WriteLine("Suurin heittotulos on " & suurin) ReadLine() End Sub End Module