洛谷B2005 字符三角形

这是一道非常简单的题,输入一个字符,按照格式输出此字符9遍即可,要有空格和换行。

代码: 

#include <iostream>

using namespace std;

char c;

int main () {
	
	cin >> one;
	
	cout << "  " << c << endl;
	cout << " " << c << c << c << endl;
	cout << c << c << c << c << c;
	
	return 0;
}

猜你喜欢

转载自blog.csdn.net/Runcode8/article/details/130512046