简单的输出,C++中可以用 \n 来表示换行,可以与之后的空格连续。 输出三行,模拟一下即可。 代码如下: C++复制#include<bits/stdc++.h> using namespace std; char c; int main(){ cin>>c; cout<<" "<<c<<" \n "<<c<<c<<c<<" \n"<<c<<c<<c<<c<<c; return 0; }