摘要: 1.编写程序判断n是正数还是负数。 #include<stdio.h> main() { int n; printf("输入一个整数:\n"); scanf("%d",&n); if (n>0) printf("%d是正数!\n",n); else if(n==0) printf("%d既不是正数, 阅读全文
posted @ 2021-11-01 19:46 。。。、; 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1.输入两个数字,输出较大的数字。 #include <stdio.h> main() { int m,n; printf("请输入两个数字"); scanf("%d,%d",&m,&n); if(m>n) printf("%d",m); else printf("%d",n); } 2.请输入一个 阅读全文
posted @ 2021-10-24 22:21 。。。、; 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 编写程序,定义两个整形变量,赋值并输出. #include<stdio.h> main() { int a=2; int b=3; printf("%d\n%d\n",a,b); } 编写程序,定义一个单精度和一个双精度的变量,赋值并输出. #include<stdio.h> main() { fl 阅读全文
posted @ 2021-10-12 22:26 。。。、; 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main() { printf("我爱学习c语音!"); } #include<stdio.h> main() { printf("计算机科学与技术\n隋欣桐"); } #include<stdio.h> main() { printf(" ***\n"); pr 阅读全文
posted @ 2021-10-04 22:09 。。。、; 阅读(5) 评论(0) 推荐(0) 编辑