摘要: 1.编写程序,判断一个数n是正数还是负数 编写程序,判断一个数n是正数还是负数 #include<stdio.h> main() { float n; scanf("%f",&n); if(n>0) printf("正数!\n"); else if(n==0) printf("0既不是正数,也不是负 阅读全文
posted @ 2021-10-22 20:18 刘凯铭 阅读(50) 评论(0) 推荐(0)
摘要: 一、 编写程序,定义两个整型变量,赋值并输出 #include<stdio.h> main() { int a=8; int b=6; printf("%d%d\n",a,b); } 二、 编写程序,定义一个单精度和一个双精度的变量,赋值并输出 #include<stdio.h> main() { 阅读全文
posted @ 2021-10-22 20:11 刘凯铭 阅读(37) 评论(0) 推荐(0)