#include <stdio.h>
void cal_array(const int(*x)[3],const int(*y)[3],int(*ans)[3]);
int main(void) {
int x[2][3]={{1,2,3},{4,5,6}};
int y[2][3]={{0,1,2},{3,4,5}};
int ans[2][3]={0};
cal_array(x,y,ans);
return 0;
}
void cal_array(const int(*x)[3],const int(*y)[3],int(*ans)[3])
{
for(int i=0;i<2;i++){
for(int j=0;j<3;j++){
printf("%d",x
[i
][j
] + y
[i
][j
]); }
}
for(int i=0;i<2;i++){
for(int j=0;j<3;j++){
printf("%d",x
[i
][j
] - y
[i
][j
]); }
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgoJdm9pZCBjYWxfYXJyYXkoY29uc3QgaW50KCp4KVszXSxjb25zdCBpbnQoKnkpWzNdLGludCgqYW5zKVszXSk7CmludCBtYWluKHZvaWQpIHsKaW50IHhbMl1bM109e3sxLDIsM30sezQsNSw2fX07CmludCB5WzJdWzNdPXt7MCwxLDJ9LHszLDQsNX19OwppbnQgYW5zWzJdWzNdPXswfTsKCmNhbF9hcnJheSh4LHksYW5zKTsKcmV0dXJuIDA7Cn0Kdm9pZCBjYWxfYXJyYXkoY29uc3QgaW50KCp4KVszXSxjb25zdCBpbnQoKnkpWzNdLGludCgqYW5zKVszXSkKewpwcmludGYoIuWKoOeul1xuIik7CmZvcihpbnQgaT0wO2k8MjtpKyspewpmb3IoaW50IGo9MDtqPDM7aisrKXsKcHJpbnRmKCIlZCIseFtpXVtqXSArIHlbaV1bal0pOwp9CnB1dGNoYXIoJ1xuJyk7Cn0KcHV0Y2hhcignXG4nKTsKCnByaW50Zigi5rib566XXG4iKTsKZm9yKGludCBpPTA7aTwyO2krKyl7CmZvcihpbnQgaj0wO2o8MztqKyspewpwcmludGYoIiVkIix4W2ldW2pdIC0geVtpXVtqXSk7Cn0KcHV0Y2hhcignXG4nKTsKfQp9Cg==