-->
当前位置:首页 > 题库

PROGRAMMING:Print character triangles

Luz5年前 (2021-05-10)题库470
Write the program, input the number of diamond lines and diamond characters, output the corresponding triangle image.
###Input format:
Enter the size n of the image (a positive integer not exceeding 9) and the characters used, separated by a space.
###Output format:
Output the corresponding triangle image, as shown in the example. If n is even, error is output.
###Input example:
```in
5 $
```
###Output example:
The corresponding output is given here. For example:
```out
$
$$$
$$$$$
```







answer:If there is no answer, please comment