This presentation is the property of its rightful owner.
1 / 16

# Двумерные массивы PowerPoint PPT Presentation

Двумерные массивы. В двумерном массиве каждый элемент фиксируется номером строки и столбца , на пересечении которых он расположен. П оложение элемента в двумерном массиве определяется двумя индексами . Они разделяются запятой.

Двумерные массивы

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

, .

. .

, , . , .

.

DIM, :

DIMA(5,7)

, 5 7 .

(3,6) 30

## ,

. , .

For i=a to b

For k=c to d

Next k

Next i

, , , 5. .

CLS

Dim A(10,10)

A(1,1)=int(rnd(1)*100)

For k=1 to 10

For m=1 to 10

If k=1 and m=1 then 10

If m=1 and k>1 then A(k,m)=A(k-1,10)+5 else A(k,m)=A(k,m-1)+5

10 next m

Next k

For k=1 to 10

For m=1 to 10

Print A(k,m);

Next m:Print

Next k

end

(6*9), 3 :1- 2- 3-

Dim A(6,9)

For k=1 to 6

For m=1 to 9 step 3

Input 1 ;A(k,m)

A(k,m+1)=2*k

A(k,m+2)=int(rnd(1)*10)

Next m

Next k

For k=1 to 6

For m=1 to 9

Print A(k);

Next m:Print

Next k

5*5 . . .

CLS: Dim A(5,5)

For k=1 to 5: for m=1 to 5

A(k,m)=int(rnd(1)*100)

Print A(k,m);:Next m:Print:Next k

Max=0

For k=1 to 5

For m=1 to 5

If A(k,m)>max then max:=A(k,m)

Next m

Next k

Print =;max

For k=1 to 5

For m=1 to 5

If A(k,m) mod 2 <>0 then A(k,m)=max

Print A(k,m);

Next m

Print

Next k

, .

CLS

Dim A(10,10),B(10)

For k=1 to 10: for m=1 to 10

A(k,m)=int(rnd(1)*100)

Print A(k,m);: Next m: Print: Next k

For k=1 to 10: min=A(k,1)

For m=1 to 10

If A(k,m)<min then min=A(k,m)

Next m

B(k)=min:Next k

For k=1 to 10

Print B(k)

Next k

, 2*5 , . .

Dim A\$(2,5)

Data , , , ,

Data , , , ,

For m=1 to 2

For n=1 to 5

Print A\$(m,n)

Next n

Print

Next m

Input F\$

For m1 to 5

If A\$(2,m)=F\$ then Print A\$(1,m)Next m