码迷,mamicode.com
首页 > 其他好文 > 详细

【入门OJ】1052:字符图形8-数字三角

时间:2017-09-15 21:37:41      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:pre   opened   技术   max   display   png   algo   string   images   

技术分享

水一发QAQ!

技术分享
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define MAXN
using namespace std;
int n;

int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n-i;j++) printf(" ");
        for(int j=1;j<=i*2-1;j++){
            printf("%d",j);
        }
        printf("\n");
    }
    return 0;
}
字符图形8-数字三角

 

【入门OJ】1052:字符图形8-数字三角

标签:pre   opened   技术   max   display   png   algo   string   images   

原文地址:http://www.cnblogs.com/Parry-PY/p/7528393.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!