编码风格工作笔记-初步模仿大佬编码风格

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq78442761/article/details/83178784

工作8个月了,发现大佬们都喜欢这样的风格:

现在我初步进行分析下!

1.喜欢宽松的代码,不喜欢紧促的代码;

2.在某个关键的地方,喜欢敲一个换行;

下面来模仿下:

#include <iostream>
#include <cstdio>

using namespace std;

int main(){

	cout << "format of output!" << endl;

	//if format

	int a = 10;

	if(a = 100){

		cout << "The a is 100" << endl;
	}
	else{

		printf("The a isn't 100\n");
	}

	return 0;
}

从今天起,本人的代码风格将会以这种形式,展示出来!

猜你喜欢

转载自blog.csdn.net/qq78442761/article/details/83178784