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

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

Advertisements
Loading...

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