给个码风建议把
  • 板块灌水区
  • 楼主AkevinMitnick
  • 当前回复18
  • 已保存回复18
  • 发布时间2024/10/28 21:43
  • 上次更新2024/10/29 09:59:09
查看原帖
给个码风建议把
1417140
AkevinMitnick楼主2024/10/28 21:43

P1001为例

1.即不加空格

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int a,b;
    cin >>a>>b;
    cout<<a+b<<endl;
    return 0;
}

2.加空格

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    int a , b;
    cin >> a >> b;
    cout << a + b << endl;
    return 0;
}

3.混合

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int a,b;
    cin >> a >> b;
    cout << a+b << endl;
    return 0;
}

评论区投票叭~

2024/10/28 21:43
加载中...