Description
Given a character, use it to construct a diagonal length of 5 characters, and tilt the diamond shape.
Input
There is only one line input, including one character.
OUTPUT
The diamond shape composed of this character.
Input Sample
*
OUTPUT SAMPLE
*
***
*****
***
*
idea
Use Cout or Printf to output.
Answer
CPP
include
using namespace std;
int Main ()
{{
char a;
cin >> a;
COUT << "" << A << Endl;
cout << "" << a << a << Endl;
COUT << a << a << a <<<<endl;
cout << "" << a << a << Endl;
COUT << "" << A << Endl;
Return 0;
}
Result
Used Memory: 200KB
Run time: 10ms
Language: G ++
Submit time: 2019-03-24 09:20:31
Proplem Link
[http://noi.openjudge.cn/ch0101/09/> [1]
OpenJudge 09:Character diamond
Comments