View Single Post
  #1  
Old 15-12-2009, 09:16 PM
.BZU.'s Avatar
.BZU. .BZU. is offline


 
Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,693
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
Default Program to find the Maximum Number in an Array (By Sheraz)

Code:
 Module Module1
   
      Sub Main()
          Dim ar As Integer()
          Dim max As Integer
          ar = New Integer() {15, 8, 1, 6, 34, 7, 5, 342, 4, 7}
   
          max = ar(0)
   
          For i = 1 To ar.GetUpperBound(0)
              If ar(i) > max Then
                  max = ar(i)
              End If
          Next
   
          Console.Write("The Maximum value of the elements of array is: {0}", max)
          Console.ReadLine()
   
      End Sub
   
  End Module

__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote