问题标题: 酷町堂:5485哪错了?

0
0
已解决
柏以轩
柏以轩
资深光能
资深光能

5485:

  • #include<iostream>
  • using namespace std;
  • int main(){
  • cout<<"________"<<endl;
  • cout<<"\ /"<<endl;
  • cout<<" \ / "<<endl;
  • cout<<" \ / "<<endl;
  • cout<<" \/ "<<endl;
  • return 0;
  • }
  • 哪错了?

0
已采纳
李牧晓
李牧晓
中级天翼
中级天翼
cout<<"\________";
    cout<<endl;
    cout<<"\\      /";
    cout<<endl;
    cout<<" \\    /";
    cout<<endl;
    cout<<"  \\  /";
    cout<<endl;
    cout<<"   \\/";

注意一下

在这里需要用到转义字符‘\’哦~~~

望采纳~

0
李子杰
李子杰
资深光能
资深光能

核心:

    cout<<"________"<<"\n";

    cout<<"\\"<<" "<<"/"<<"\n";

    cout<<" "<<"\\"<<" "<<"/"<<"\n";

    cout<<" "<<"\\"<<" "<<"/"<<"\n";

    cout<<" "<<"\\"<<"/";

其它只要加上基本代码和定义即可全对!!!

 

0
潘艺博
潘艺博
初级天翼
初级天翼

    输出    "________"    换行;
    输出    "\\      /"    换行;
    输出    " "<<"\\    /"    换行l;
    输出    " "<<" "<<"\\  /"    换行;
    输出    " "<<" "<<" "<<"\\/"    换行;

潘艺博在2021-05-22 11:30:01追加了内容

额...... l 多打了,请直接忽略

0
我要回答