#include <stdio.h>
// 递归方式
void printPatternRecursively(int n) {
if (n == 0) {
return;
}
printPatternRecursively(n - 1);
for (int i = 0; i < n; i++) {
printf("%d ", n);
}
printf("\n");
}
int main() {
int num;
printf("输入要打印的行数:");
scanf("%d", &num);
printPatternRecursively(num);
return 0;
}