#include <stdio.h>
#include <stdlib.h>
int main(void){
int a,b,n=1;
printf("Please enter in the order of row, column"); 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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpewogICAgaW50IGEsYixuPTE7CiAgICBwcmludGYoIlBsZWFzZSBlbnRlciBpbiB0aGUgb3JkZXIgb2Ygcm93LCBjb2x1bW4iKTsKICAgIHNjYW5mKCIlZCVkIiwgJmEsICZiKTsKICAgIGludCAqcCA9IChpbnQqKW1hbGxvYyhzaXplb2YoaW50KSogYSAqIGIpOwogICAgZm9yKGludCBpPTA7IGkgPCBhOyBpKyspewogICAgICAgIGZvcihpbnQgaj0wOyBqIDwgYjsgaisrKXsKICAgICAgICAgICAgKihwICsgaSArIGIgKiBqKSA9IG47CiAgICAgICAgICAgIHByaW50ZigiJWQgIiwgbik7CiAgICAgICAgICAgIG4rKzsKICAgICAgICB9CiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQogICAgZnJlZShwKTsKICAgIHJldHVybiAwOwp9