Dinamik Diziler

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

Saat
 
 
Bugün 2 ziyaretçi (20 klik) kişi burdaydı!
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol