C语言学习
1.标准格式
#include <stdio.h>
int main()
{
return 0;
}
这是c语言编写的标准格式;
要注意中英切换,中文符号往往会引发报错;
2.printf输出
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
所有C语言学习者的入门第一课达成了!
3.四类定义
int:定义整数类型;
float:定义浮点型;
double:定义浮点型;
char:定义字符型;
4.if_else
if(ture)
{}
else
{}
4.1 if嵌套
if(ture)
{if(ture)
{}
else{}
}
else
{}
4.2 else嵌套
if(ture)
{}
else{
if()
{}
else
{}
}
浙公网安备 33010602011771号