Problem1021--[视频]两重for循环3(打印菱形)

1021: [视频]两重for循环3(打印菱形)

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 22  Solved: 14
[Status] [Submit] [Creator:]

Description

学习目标:300 秒内 一气呵成 打完代码,并且运行正确,并且提交正确。

【题意】

输入n,打印规模为n(n为奇数)的菱形。
菱形长什么样子?
当n=3时,菱形如下:
 *
***
 *
当n=5时,菱形如下:
  *
 ***
*****
 ***
  *
【输入格式】
一行一个整数n,表示菱形的规模。
【输出格式】
如题意输出规模为n的菱形。
【样例1输入】
3
【样例1输出】
 *
***
 *
【样例2输入】
5
【样例2输出】
  *
 ***
*****
 ***
  *

Source/Category