题解 | #翻转金字塔图案#
翻转金字塔图案
https://www.nowcoder.com/practice/c4775776e4464537bfb6a5ba37c596c6
#include <stdio.h> int main() { int n; while (scanf("%d", &n) != EOF) { // 注意 while 处理多个 case // 64 位输出请用 printf("%lld") to int i=0; int j=0; for(i=0;i<n;i++) { for(j=0;j<i;j++) { printf(" "); } for(j=0;j<n-i;j++) { printf("* "); } printf("\n"); } } return 0; }