摘要: 001、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c #include <stdio.h> int main(void) { double i; //声明double型 和 float型变量 float j; i = 3.14; j 阅读全文
posted @ 2024-08-19 23:35 小鲨鱼2018 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 001、a、%lf、和 %f读入double型值 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试程序 #include <stdio.h> int main(void) { double i, j; // 声明两个double 阅读全文
posted @ 2024-08-19 22:51 小鲨鱼2018 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 001、 测试%lf输出double型和int型变量的差异 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试c程序 #include <stdio.h> int main(void) { double i; /*声明doble型 阅读全文
posted @ 2024-08-19 21:54 小鲨鱼2018 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 001、读入整型数据 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c ## 测试脚本 #include <stdio.h> int main(void) { int i; //声明整型变量 puts("please input an in 阅读全文
posted @ 2024-08-19 21:37 小鲨鱼2018 阅读(14) 评论(0) 推荐(0) 编辑