题解 | #翻转金字塔图案#

翻转金字塔图案

https://www.nowcoder.com/practice/c4775776e4464537bfb6a5ba37c596c6

#include <stdio.h>

int main() {
    int n = 0;
    
   while(scanf("%d", &n)!=EOF){
 for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            if (j <i) {
                printf(" ");

            } else {

                printf("* ") ;
            }



        }
        printf("\n");
    }

   }
    return 0;
}

全部评论

相关推荐

野猪不是猪🐗:我assume that你must技术aspect是solid的,temperament也挺good的,however面试不太serious,generally会feel style上不够sharp
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务