Created
May 18, 2012 23:20
-
-
Save ernado/2728083 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uses | |
| crt; | |
| var | |
| N,i,j:byte; | |
| a: array[1..20,1..20] of integer; | |
| t:integer; | |
| procedure VIVOD; | |
| begin | |
| for i:=1 to N do | |
| begin | |
| for j:=1 to N do | |
| Write(a[i,j]:4); | |
| WriteLn; | |
| end; | |
| end; | |
| begin | |
| ClrScr; | |
| Randomize; | |
| Write('N: '); ReadLn(N); | |
| for i:=1 to N do | |
| for j:=1 to N do | |
| a[i,j] := Random(30)-15; | |
| VIVOD; | |
| for i:=1 to N do | |
| begin | |
| t := a[1,i]; | |
| a[1,i] := a[i, 1]; | |
| a[i,1] := t; | |
| end; | |
| WriteLn; | |
| VIVOD; | |
| ReadKey; | |
| end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment