#include <stdio.h>
void calcukate(int (*a)[4]);
int main(void) {
int a[3][4]={ {1,2,3,4},{5,6,7,8},{9,10,11,12} };
calculate(a);
return 0;
}
void calculate(int (*a)[4]){
int sum=0;
for(int i=0;i<3;i++){
for(int j=0;j<4;j++){
sum=sum+a[i][j];
}
sum=0;
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsY3VrYXRlKGludCAoKmEpWzRdKTsKaW50IG1haW4odm9pZCkgewoJaW50IGFbM11bNF09eyB7MSwyLDMsNH0sezUsNiw3LDh9LHs5LDEwLDExLDEyfSB9OwoJY2FsY3VsYXRlKGEpOwoKCXJldHVybiAwOwp9CnZvaWQgY2FsY3VsYXRlKGludCAoKmEpWzRdKXsKCWludCBzdW09MDsKCWZvcihpbnQgaT0wO2k8MztpKyspewoJCWZvcihpbnQgaj0wO2o8NDtqKyspewoJCQlzdW09c3VtK2FbaV1bal07CgkJfQoJCXByaW50ZigiJWRcbiIsc3VtKTsKCQlzdW09MDsKCX0KfQ==