-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path09.cpp
More file actions
56 lines (41 loc) · 997 Bytes
/
09.cpp
File metadata and controls
56 lines (41 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* #include<iostream>
using namespace std;
void check(int *arr,int m,int n){
cout<<"Working"<<endl;
}
int main(){
int arr[2][3] = {0};
check(arr,2,3);
return 0;
} */
#include <iostream>
using namespace std ;
void test( int arr[] ) {
for ( int i = 0 ; arr[i] != NULL ; ++i )
arr[i] += i ;
}
void test2( int (*arr)[] , int n ) {
for ( auto i = 0 ; i < n ; ++i ) {
for ( auto j = 0 ; j < n ; ++j )
cout << arr[i][j] ;
cout << endl ;
}
}
int main() {
/* if (0) {
int a[10] = { 1, 'a', 3, 4, 5 } ;
char str[] = { 67, 'h', 'u', 'b', 'h', '\n','b', 101, 'n','s', 'a', 'l' } ;
cout << str << endl ;
test( a ) ;
for ( int i = 0 ; a[i] != NULL ; ++i )
cout << a[i] << ' ' ;
} */
int n ;
cin >> n ;
int (*arr)[n] ;
for ( int i = 0 ; i < n ; ++i ) {
for ( auto j = 0 ; j < n ; ++j )
cin >> arr[i][j] ;
}
test2(arr,n) ;
}