Dobili smo za domaci tj za vezbanje neki zadatak da uradimo u basicu 6.0 radili smo programe onako klasice gluposti naci obim i povrsinu i te fore.....a sad smo dobili matricu? dali valja ovo nesto sto sam ja radio ?
uradio sam kod ovako:
deklarisanje
Dim m As Integer, n As Integer, i As Integer, j As Integer, A(1 To 10, 1 To 10) As Single, B(1 To 10) As Single, X(1 To 10) As Integer, suma As Double
ucitavanje matrice a
m = Val(txtm)
n = Val(txtn)
For i = 1 To m
For j = 1 To n
A(i, j) = InputBox(" Unesi: A(" & i & "," & j & ")")
Next j
Next i
End Sub
ucitavanje niza b
n = Val(txtn)
For i = 1 To n
B(i) = InputBox("Unesi: B(" & i & ")")
Next i
End Sub
svodjenje na trougaonu matricu
m = Val(txtm)
n = Val(txtn)
For i = 1 To m
For j = 1 To n
A(i, j) = InputBox(" Unesi: A(" & i & "," & j & ")")
Next j
Next i
sad jos samo da namestim da mi stampa X1,X2,X3..... ima li neko ideju kako to da uradim ? i dali ovo svodjene na trougaoni oblik valja nesto ?
|