题解 | #反斜线形图案#
反斜线形图案
http://www.nowcoder.com/practice/7b066963c4eb4d188becd18c37dfe22d
include<stdio.h>//解法一
int main()
{
int a = 0;
while (~scanf("%d", &a))
{
for (int b = 0; b < a; b++)
{
for (int c = 0; c < b; c++)
{
printf(" ");
}printf("*");
for (int d = 0; d < a - 1 - b; d++)
{
printf(" ");
}
printf("\n");
}
}return 0;
}