1 solutions
-
0
C :
#include<stdio.h> int main() { int i,j; int a[3][3]; for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d ",a[j][i]); if(i!=2) puts(""); } return 0; }C++ :
#include<iostream> using namespace std; int main() { int a[3][3],b,c,d; for(b=0; b<3; b++) for(c=0; c<3; c++) cin>>a[b][c]; for(b=0; b<3; b++) { for(c=0; c<3; c++) cout<<a[c][b]<<' '; cout<<endl; } }Pascal :
var a:array [1..3,1..3] of shortint; i,j:integer; begin for i:=1 to 3 do for j:=1 to 3 do read(a[i,j]); for i:=1 to 3 do begin for j:=1 to 3 do write(a[j,i],' '); if j=3 then writeln; end; end.
- 1
Information
- ID
- 19339
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By