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