OpenJude_1.1.9 字符菱形

1. 题目

2. 答案

 1 #include<iostream>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     char c;
 7     cin >> c;
 8     cout << "  " << c << endl;
 9     cout << " " << c << c << c << endl;
10     cout << c << c << c << c << c << endl;
11     cout << " " << c << c << c << endl;
12     cout << "  " << c << endl;
13     return 0;
14 }

 

posted @ 2015-11-29 19:25  时间刺客  阅读(301)  评论(0编辑  收藏  举报