跳到正文

剪贴板

剪贴板 7mekxbd8

原文
剪贴板信息

剪贴板信息

收录
更新

zhuruirong的码风

不正常的码风

未入门时的变异码风(数组和 if 是根据当时码风加上去的):

C++
#include<iostream>
using namespace std;int main(){
cout<<"HelloWorld!"<<endl;
int n=0;a[n+1]=0;
if(a[n+1]==0)cout<<"YES"<<endl;
return 0;}

正常码风

第一码风:

C++
#include<iostream>
using namespace std;
int a[100];
int main()
{
  cout<<"HelloWorld!"<<endl;
  int n=0;
  a[n+1]=0;
  if(a[n+1]==0)
    cout<<"YES"<<endl;
  return 0;
}

第二码风:

C++
#include <iostream>
using namespace std;
int a[100];
int main()
{
  cout << "HelloWorld!" << endl;
  int n = 0;
  a[n + 1] = 0;
  if(a[n + 1] == 0)
    cout << "YES" << endl;
  return 0;
}

第三码风:

C++
#include <iostream>
using namespace std;

const int N=100;
int a[N];

int main(){

  cout<<"HelloWorld!"<<endl;
  int n=0;
  a[n+1]=0;
  if(!a[n+1])
    cout<<"YES"<<endl;

  return 0;
}

第四码风:

C++
#include <bits/stdc++.h>
using namespace std;

const int N = 100;
int a[N], n;

int main() {

  puts("HelloWorld!");
  a[++n] = 0;
  if(!a[n])
    puts("YES");

  return 0;
}

第五码风(其实没用几天):

C++
#include <bits/stdc++.h>
using namespace std;

const int N = 100;
int a[N], n;

int main() {

  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);

  cout << "HelloWorld!" << endl;
  a[++n] = 0;
  if(!a[n]) {
    cout << "YES" << endl;
  }

  return 0;
}

第六马蜂:

C++
#include <bits/stdc++.h>
using namespace std;

const int N = 100;
int a[N], n;

int main() {

  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);

  cout << "HelloWorld!" << endl;
  a[++n] = 0;
  if (!a[n]) cout << "YES" << endl;

  return 0;
}

现在码风没想到吧,又改回来了:

C++
#include <bits/stdc++.h>
using namespace std;

const int N = 100;
int a[N], n;

int main() {

  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);

  cout << "HelloWorld!" << endl;
  a[++n] = 0;
  if(!a[n]) {
    cout << "YES" << endl;
  }

  return 0;
}