//<eg>给定一个字符,用它构造一个对角线长5个字符,倾斜放置的菱形。
#include <iostream>
using namespace std;
int main()
{
char a;
while (true)
{
cout << "请输入任意字符:";
cin >> a;
cout << " " << a << endl;
cout << " " << a << a << a << endl;
cout << a << a << a << a << a << endl;
cout << " " << a << a << a << endl;
cout << " " << a << endl;
}
}
© 版权声明
THE END
暂无评论内容