#include <stdio.h> {spa printf("hello world");blog return 0;ci }字符串 |
编译、运行:io
结果:编译
#include <stdio.h>table
int main()class {程序
return 0; } |
注意:要有分号奥
不要用中文(字符串外的符合要英文字符)
printf("hello world\n");
(1)“”里面的内容叫作字符串
printf会把字符串原封不动的输出
(2)\n表示在输出结果后面换行
scanf("%d",&price);
printf("%d",12+3)
---->%d说明后面有一个整数要输出在%d的位置上
四则运算 |
c符合 |
意义 |
+ |
+ |
加 |
减 |
||
x |
* |
乘 |
|
/ |
除 |
|
% |
取余 |
() |
() |
括号 |