Problem Description
从键盘输入一个整数n(1≤n≤9),打印出指定的菱形。
Input
正整数n(1≤n≤9)。
Output
指定的菱形。
第一行前面有n-1个空格,第二行有n-2个空格,依此类推。
第一行前面有n-1个空格,第二行有n-2个空格,依此类推。
Example Input
5
Example Output
* *** ***** ******* ********* ******* ***** ****
#include<stdio.h> int main() { int n,i,j; scanf("%d",&n); for(i=1;i<=n;i++) { for(j=1;j<=n-i;j++) printf(" "); for(j=1;j<=i;j++) printf("*");