/* hello world */
#include <stdio.h>
int main()
{
puts("C语言入门!!!");
return 0;
}
/* 变量和基本数据类型 */
#include <stdio.h>
int main()
{
int n1 = 100;
char c1 = '@'; //字符用单引号包围,字符串用双引号包围
float moneys = 90003.97;
printf("n1=%d, c1=%c, moneys=%f\n", n1, c1, moneys);
return 0;
}
/* 加减乘除 */
#include <stdio.h>
int main()
{
int a1 = 102;
int b1 = 9977;
float c1 = 87.51;
int m1 = a1 + b1;
float n1 = b1 * c1;
double p1 = a1 / c1;
int q1 = b1 % a1;
printf("m1=%d, n1=%f, p1=%lf, q1=%d\n", m1, n1, p1, q1);
return 0;
}
/* 自增自减 */
#include <stdio.h>
int main()
{
in
图解基本C语言程序一
最新推荐文章于 2023-11-21 18:18:17 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)