Wątek przeniesiony 2016-09-05 14:59 z C# i .NET przez DibbyDum.

Jak zapisać to Poprawnie ?

0

Witam

Mam problem dotyczący takiego zadania .

Zdefiniuj strukturę student o 2 polach (nr_indexu oraz ocena) zadeklaruj tablicę 10 takich studentów .
W pętli nadaj wszystkim studentam ten sam numer indeksu i tą samą ocenę (nr_indexu =88990011 oraz ocena=4).

A więc spiszę strukturę

Structure student
    Dim nr_indexu As Integer
    Dim ocena As Integer 
End Structure 

Private Sub Procedurka
Dim tablicaStudent(10) As student 
Dim i As Integer 
For Licznik As Integer = 1 to 10 
i=i+1
tablicaStudent(i).nr_indexu = 88990011
tablicaStudent(i).nr_indexu = 4 

Next 

End Sub 

Czy to tak powinno wyglądać ?
Proszę o pomoc i wskazanie jak to ma wyglądać .

0

W pętli 2 razy przypisujesz nr_indexu zamiast raz nr_indexu a raz ocene.
Zmienna "i" jest nie potrzebna z tego co widzę

1 użytkowników online, w tym zalogowanych: 0, gości: 1