标签:class blog code tar 2014 art
#include <stdio.h> void printSpace(int i){ for(int k = 0; k < i; ++k) putchar(' '); } void printStart(int k){ for(int i = 0; i < k; ++i) putchar('*'); } int main(){ int n; while(scanf("%d", &n) == 1){ for(int i = 1; i <= n; ++i){ printSpace(n - i); printStart(2 * i - 1); printf("\n"); } } return 0; }
标签:class blog code tar 2014 art
原文地址:http://blog.csdn.net/chang_mu/article/details/30256449