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

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


  • 94 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

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

An Image/Link below is provided (as is) to download 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 - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


5704530


5704530

, .

. .

, , . , .

.


5704530

DIM, :

DIMA(5,7)

, 5 7 .


5704530

: .

(3,6) 30


5704530

,

. , .

For i=a to b

For k=c to d

Next k

Next i


5704530


5704530

, , , 5. .


5704530

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


5704530

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


5704530

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


5704530

5*5 . . .


5704530

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


5704530

, .


5704530

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


5704530

, 2*5 , . .


5704530

Dim A$(2,5)

Data , , , ,

Data , , , ,

For m=1 to 2

For n=1 to 5

Read A$(m,n)

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


  • Login