大一C语言学习总结 | 您所在的位置:网站首页 › 大一c语言学习总结 › 大一C语言学习总结 |
作为一个新学计算机的大一新生,我们有多不了解的,作为一名初学者,我们c语言来开始学习c语言是一切编程语言的基础好好学习从c语言,有助于我们对于其他语言的了解和以后的学习
例如我们输出hello wrold #include int main() { printf("Hello World!\n"); return 0; }输出的结果就是 Hello World! Process exited after 25.79 seconds with return value 20 请按任意键继续. . .a b相加并输出和sum #include int main(void) { int a,b,sum; scanf("%d%d", &a, &b); sum=a+b; printf("c=%d", c ); return 0; }输出结果为 12 26 c=38 Process exited after 25.79 seconds with return value 20 请按任意键继续. . .比较两个数大小,并输出最大值 #include void main() { int a,b; scanf("%d%d",&a,&b); printf("%d",a>b?a:b); }结果为 24 23 24 Process exited after 25.79 seconds with return value 20 请按任意键继续. . . 算法计算3的阶乘 #include int main() { int i,t; t=1; i=2; while(i |
CopyRight 2018-2019 实验室设备网 版权所有 |