摘要: 编写程序,使用scanf()函数接受整型,实型,字符型的变量,并分行依次输出 #include<stdio.h> main(){ int a; float b; char c; scanf("%d,%f,%c",&a,&b,&c); printf("%d\n--%f\n--%c\n",a,b,c); 阅读全文
posted @ 2021-10-15 20:20 苏本琪 阅读(38) 评论(0) 推荐(0)
摘要: 1.编写程序,定义两个整型变量,赋值并输出 #include<stdio.h> main(){ int a=3; int b=4; printf("a的值是%d\n",a); printf("b的值是%d\n",b); } 2.编写程序,定义一个单精度和双精度的变量,赋值并输出 #include<s 阅读全文
posted @ 2021-10-12 16:40 苏本琪 阅读(63) 评论(0) 推荐(0)
摘要: 1.编写程序,输出“我爱学习C语言!”。 #include<stdio.h> main(){ printf("我爱学习C语言!"); } 2.分行输出自己的专业和姓名 #include<stdio.h> main(){ printf("计算机2107\n"); printf("苏本琪\n"); } 阅读全文
posted @ 2021-10-02 13:00 苏本琪 阅读(19) 评论(0) 推荐(0)