代碼如下:
#include?<stdio.h>
int?main()
{
int?a,?n?=?3;
int?b[20][4]?=?{0};
printf("Please?input?the?number?of?rows:\n");
scanf("%d",&a);
for(int?i?=?1;?i?<=?a;?i++)
{
for?(int?j?=?0;?j?<?4;?j++)
{
b[i][j]?=?n?*?i?+?2?*?j;
printf("%d\t",b[i][j]);
}
printf("\n");
}
getchar();
return?0;
}