#include <stdio.h>
void calculate(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;
for(int i=0;i<3;i++){
sum = 0;
for(int k=0;k<4;k++){
sum = sum + a[i][k];
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbGN1bGF0ZShpbnQgKCphKVs0XSk7CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYVszXVs0XSA9IHsgezEsMiwzLDR9LCB7NSw2LDcsOH0sIHs5LDEwLDExLDEyfSB9OwoJCgljYWxjdWxhdGUoYSk7CgkKCXJldHVybiAwOwp9Cgp2b2lkIGNhbGN1bGF0ZShpbnQgKCphKVs0XSkgewoJaW50IHN1bTsKCQoJZm9yKGludCBpPTA7aTwzO2krKyl7CgkJc3VtID0gMDsKCQlmb3IoaW50IGs9MDtrPDQ7aysrKXsKCQkJc3VtID0gc3VtICsgYVtpXVtrXTsKCQl9CgkJcHJpbnRmKCIlZOOBryVkXG4iLCBpKzEsc3VtKTsKCX0KfQo=