Laman

Minggu, 06 Mei 2012

Contoh Program Deret Kuadrat Pada Console Aplication

Module Module1

    Sub Main()
        Dim a As Integer
        Dim b As Integer
        For a = 1 To 5
            For b = 1 To a
                Console.Write(b ^ 2)
                Console.Write(" ")
            Next b
            Console.WriteLine()

        Next a
        Console.ReadLine()

    End Sub

End Module


Hasi Output :


1
1 4
1 4 9
1 4 9 16
1 4 9 16 25

Tidak ada komentar:

Posting Komentar