#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
int main()
{
int row = 0, col = 0, count = 0, temp = 0;
printf("请输入行数与列数:");
scanf("%d %d", &row, &col);
temp = row * col;
for (count = 1; count <= temp; count++)//控制行数
{
printf("%d
", count);
if (count % col == 0)//是否整除
{
printf("\n");
}
}
system("pause");
return 0;
}