【题目描述】
给定一个字符,用它构造一个对角线长5个字符,倾斜放置的菱形。
【输入】
输入只有一行, 包含一个字符。
【输出】
该字符构成的菱形。
【输入样例】
*
【输出样例】
*
***
*****
***
*
【源程序】
#include<iostream>
using namespace std;
int main()
{
char ch;
cin>>ch;
cout<<" "<<ch<<endl;
cout<<" "<<ch<<ch<<ch<<endl;
cout<<ch<<ch<<ch<<ch<<ch<<endl;
cout<<" "<<ch<<ch<<ch<<endl;
cout<<" "<<ch<<endl;
return 0;
}