google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Thursday 29 January 2015

Program to take input an array of names(String) and then display it. (on console)



Program to take input an array of names(String) and then display it.
(on console)
Source code:-

Module Module1

    Sub Main()
        Dim name(5) As String
        Dim i As Integer
        For i = 0 To 4
            Console.Write("Enter the name of{0}:", i + 1)
            name(i) = Console.ReadLine()
        Next
        For i = 0 To 4
            Console.Write("The name of {0} is:", i + 1)
            Console.WriteLine(name(i))
        Next
        Console.ReadLine()
    End Sub
End Module

0 comments:

Post a Comment