' Visual Basic 2008 9.0 .NET Examples - Iterations - Introduction to Visual Basic : Module Exercise2Solution Sub Main() Dim hours, minutes, seconds As Integer Dim timeLabel As String For hours = 0 To 23 For minutes = 0 To 59 For seconds = 0 To 59 timeLabel = "" If hours < 10 Then timeLabel = "0" End If timeLabel = timeLabel & hours & "h" If minutes < 10 Then timeLabel = timeLabel & "0" End If timeLabel = timeLabel & minutes & "m" If seconds < 10 Then timeLabel = timeLabel & "0" End If timeLabel = timeLabel & seconds & "s" Console.WriteLine(timeLabel) Next Next Next Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.