Bu tip dizilerde değişkene atanacak dizi sayısında bir sınırlama yoktur.
Örnek 1
Option Explicit
Option Base 1
Private Sub Form_Load()
Dim ogrenci() As Integer
Dim sayi As Integer
Dim a, toplam, ortalama
sayi = InputBox("Öğrenci sayısını giriniz")
ReDim ogrenci(sayi) As Integer
For a = 1 To sayi
ogrenci(a) = InputBox(Str(a) + ".Öğrencinin notunu girin")
toplam = toplam + ogrenci(a)
Next a
FontSize = 15
Show
ortalama = toplam / sayi
Print "Not Ortalaması :"; ortalama
End Sub |