Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Do While Gen of Y

Module VBModule
 
    Sub Main()
    
        Dim nnum As ULong = 1
        Dim Y As String = "1"
        Dim lnum As String = "1"
        Dim snum as string = ""
        Dim startn as long = 20
        Dim endn as long = 0
        Dim YResult(20,1) as string
        Dim RowIndex as integer = 0
        Dim ColIndex as integer = 1

        do while startn <> endn
            RowIndex = RowIndex + 1
            ColIndex = 0
            YResult(RowIndex, ColIndex) = nnum
            nnum = nnum + 1
            snum = Cstr(nnum)
            lnum = lnum & snum
            lnum = lnum.Replace(" ", "")
            Y = lnum
            ColIndex = 1
            YResult(RowIndex, ColIndex) = Y
            endn = endn + 1
        loop
        
        For i as integer = 1 to RowIndex
            if i < 10 then
                console.writeline(Yresult(i, 0) & "    " & Yresult(i, 1))
            else
                console.writeline(Yresult(i, 0) & "   " & Yresult(i, 1))
            end if
        Next
        
        console.write("Y = ")
        Console.Write(Y)
        
    End Sub
  
End Module

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.