Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DIM A(1 TO 4, 1 TO 4) AS SINGLE, I AS INTEGER, J AS INTEGER
- DIM MaxI AS INTEGER, MaxJ AS INTEGER, Max AS SINGLE
- CONST N = 7
- A(1, 1) = N: A(2, 1) = 2: A(3, 1) = -1.1: A(4, 1) = N + N / 10
- A(1, 2) = 0: A(2, 2) = 4.4: A(3, 2) = 2 * N: A(4, 2) = 3
- A(1, 3) = -5: A(2, 3) = 4 * N: A(3, 3) = 3: A(4, 3) = 3 - N
- A(1, 4) = 2: A(2, 4) = 6: A(3, 4) = N / 100: A(4, 4) = 5
- Max = 0
- FOR J = 1 TO 4
- FOR I = 1 TO 4
- IF A(I, J) > Max THEN
- Max = A(I, J): MaxI = I: MaxJ = J
- END IF
- PRINT A(I, J);
- NEXT I
- PRINT ""
- NEXT J
- PRINT "Координаты максимального элемента: "; MaxI; ","; MaxJ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement