#include <stdio.h>
#include <stdlib.h>
int main(void){
int a,b,n=1;
printf("Please enter in the order of row, column\n"); int *p
= (int*)malloc(sizeof(int)* a
* b
); for(int i=0; i < a; i++){
for(int j=0; j < b; j++){
*(p + i + b * j) = n;
n++;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpewogICAgaW50IGEsYixuPTE7CiAgICBwcmludGYoIlBsZWFzZSBlbnRlciBpbiB0aGUgb3JkZXIgb2Ygcm93LCBjb2x1bW5cbiIpOwogICAgc2NhbmYoIiVkJWQiLCAmYSwgJmIpOwogICAgaW50ICpwID0gKGludCopbWFsbG9jKHNpemVvZihpbnQpKiBhICogYik7CiAgICBmb3IoaW50IGk9MDsgaSA8IGE7IGkrKyl7CiAgICAgICAgZm9yKGludCBqPTA7IGogPCBiOyBqKyspewogICAgICAgICAgICAqKHAgKyBpICsgYiAqIGopID0gbjsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLCBuKTsKICAgICAgICAgICAgbisrOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CiAgICBmcmVlKHApOwogICAgcmV0dXJuIDA7Cn0=