表達(dá)式(Expressions)
返回
5個(gè)一行輸出程序
#include
int main()
{
int i;
for (i=1; i<=23; i++)
printf("%2d%c", i, (i % 5) ? ' ' : '\n');
return 0;
}
/*
輸出結(jié)果
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23
*/
int main(void) {
int i = 8;
printf("%d\n",i++ * i++);
}
程序執(zhí)行的結(jié)果時(shí)64
int main(void) {
int i = 10;
i = i++;
printf("%d\n",i);
i = i + 1;
printf("%d\n",i);
}
程序執(zhí)行的結(jié)果:
11
12
注意:增加要用后一種,i=i+1
#include
int main(void) {
int a = 1000, b=1000;
long int c = a*b;
printf("%d\n",c);
}
該用如下程序
#include
int main(void) {
int a = 1000, b=1000;
long int c = (long int)a*b;
printf("%d\n",c);
}
返回
宜春市|
西盟|
巫山县|
梁河县|
新竹市|
铜山县|
昆山市|
武义县|
凌源市|
杨浦区|
宁化县|
竹溪县|
黑龙江省|
永胜县|
托克逊县|
城口县|
昆山市|
合阳县|
聂荣县|
德钦县|
宝兴县|
北海市|
固始县|
马公市|
周至县|
新津县|
天长市|
紫阳县|
张家川|
凤阳县|
博兴县|
营口市|
射阳县|
灌云县|
临汾市|
乌海市|
西和县|
谷城县|
台东市|
云霄县|
茌平县|