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

Sort

Module Module1

    Sub Main()
        Dim MyArray(9) As Single
        For i as integer = 0 To UBound(MyArray)
            MyArray(i) = Rnd()
        Next

        Dim SwapMade As Boolean = True

        While SwapMade = True
            SwapMade = False

            For i as integer = 0 To MyArray.Length - 2
                If MyArray(i) > MyArray(i + 1) Then
                    Dim temp As Single
                    temp = MyArray(i + 1)
                    MyArray(i + 1) = MyArray(i)
                    MyArray(i) = temp
                    SwapMade = True
                End If
            Next i
        End While

        For i as integer = 0 To UBound(MyArray)
            Console.WriteLine(MyArray(i))
        Next
        Console.ReadLine()
    End Sub

End Module

dddddd

Option Strict On
Module Module1



    Sub Main()
        Dim s As String = Console.ReadLine()
        For i As Integer = From s.Length() - 1 to 0 step -1
                               Console.Write(i)
        Next
        End For

        Console.ReadLine()

    End Sub

End Module

ghgzujgh

Module VBModule
 
    Sub Main()
        Console.WriteLine("Hello, world!")
        
                            Dim kundenanmerkung As String = "sfggggggggggggggffffffffffffffgggggggggggssssssssssssssssssssgfgggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssss"
                    Dim kndan1 As String = ""
                    Dim kndan2 As String = ""
                    Dim kndan3 As String = ""
                    dim x as Integer = 0
                    kndan1 = kundenanmerkung.Substring(0, x)
                    If kundenanmerkung.Length > 60 Then
                        x = kundenanmerkung.Length - 60
                        kndan2 = kundenanmerkung.Substring(60, x)
                    End If
                    If kundenanmerkung.Length > 120 Then
                    x = x + kundenanmerkung.Length
                        kndan3 = kundenanmerkung.Substring(120, x)
                    End If 
        
        Console.WriteLine(kndan1)
        Console.WriteLine(kndan2)
        Console.WriteLine(kndan3)
        
    End Sub
  
End Module

ScratchPad

Module VBModule
 
    Sub Main()
        Console.WriteLine("Hello, world!")
    End Sub
  
End Module

Compile and Execute VB.Net Online

Module VBModule
 
    Sub Main()
        Console.WriteLine("Hello, world!")
    End Sub
  
End Module

ffffff

Option Strict On
Module Module1
    Function ReadArr() As Double()
        Dim n As Integer = CInt(Console.ReadLine())
        Dim res(n - 1) As Double
        For i As Integer = 0 To res.Length() - 1
            res(i) = CDbl(Console.ReadLine())
        Next
        Return res
    End Function

    Sub Swap(ByVal arr() As Integer, ByVal i As Integer, ByVal j As Integer)
        Dim temp As Integer = arr(i)
        arr(i) = arr(j)
        arr(j) = temp
    End Sub

    Sub Inverse(ByVal arr() As Integer)
        Dim left As Integer = 0
        Dim right As Integer = arr.Length - 1
        While left < right
            Swap(arr, left, right)
            left += 1
            right -= 1
        End While
    End Sub

    Sub Main()
        Dim arr() As Integer = ReadArr(arr)


    End Sub

End Module

rectangle

Imports System
Public Class Rectangle
    Private length As Double
    Private width As Double

    'Public methods
    Public Sub AcceptDetails()
        length = 4.5
        width = 3.5
    End Sub

    Public Function GetArea() As Double
        GetArea = length * width
    End Function
    Public Sub Display()
        Console.WriteLine("Length: {0}", length)
        Console.WriteLine("Width: {0}", width)
        Console.WriteLine("Area: {0}", GetArea())

    End Sub

    Shared Sub Main()
        Dim r As New Rectangle()
        r.Acceptdetails()
        r.Display()
        Console.ReadLine()
    End Sub
End Class

AAAA

Module Module1
    Function FillArr(ByVal arr() As Double) As Integer
        For i As Integer = 0 To arr.Length() - 1
            arr(i) = CDbl(Console.ReadLine())
        Next
        Return 0
    End Function
    Function SwitchArr(ByVal arr() As Double) As Integer
        Dim count As Integer = 0
        For i As Integer = 0 To arr.Length() - 1
            If arr(i) < 0 Then arr(i) = 0 
            count += 1

        Next
        return count
    End Function
    
    Function PrintArr(ByVal arr() As Double) As Integer

        For i As Integer = 0 To arr.Length() - 1
            Console.Write(arr(i) & " ")
        Next
        Console.WriteLine()
        Return 0
    End Function



    Sub Main()
        Dim n As Integer = CInt(Console.ReadLine())
        Dim arr(n - 1) As Double
        FillArr(arr)
        Dim res as integer = SwitchArr(arr)
        PrintArr(arr)
        Console.WriteLine(res)
        Console.ReadKey()


    End Sub

End Module

AAAA

Option Strict On
Module Module1
    Function FillArr(ByVal arr() As Double) As Integer
        For i As Integer = 0 To arr.Length() - 1
            arr(i) = CDbl(Console.ReadLine())
        Next
        Return 0
    End Function

    

    Sub Main()
        Dim n As Integer = CInt(Console.ReadLine())
        Dim arr(n - 1) As Double
        FillArr(arr)

        Dim flag As Boolean = True

        For i As Integer = 0 To arr.Length - 1
            If arr(i) <> arr((n - 1) - i) Then 
                flag = False
                Exit For
            end IF
        Next

        Console.WriteLine(flag)
        Console.ReadKey()
    End Sub

End Module

Test.vb

Module VBModule
 
    Sub Main()
        Console.WriteLine("Hello, world!")
    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.