上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 180 下一页
摘要: #include <stdio.h> //将10进制正整数转化为二进制 【5】 dec2bin(int m) { int bin[32],j; for(j=0;【1】;j++) { bin[j]=【2】; m=【3】; } for(;【4】;j--) printf("%d",bin[j-1]); } 阅读全文
posted @ 2023-02-08 19:46 myrj 阅读(39) 评论(0) 推荐(0) 编辑
摘要: //功能:对=1,2,3,4,5,6,..,9,10 //求f(x)=x*x-5*x=sin(x)的最大值 并保留两位小数 #include <stdio.h> 【1】 【2】 f(x) x*x-5*x+sin(x) main( ) { int x;float max; max=【3】; for(x 阅读全文
posted @ 2023-02-08 19:36 myrj 阅读(26) 评论(0) 推荐(0) 编辑
摘要: //下面程序的运行结果为_______________。 #include"stdio.h" main( ) { int a=3,b=5,c=8; if(a++<3 && c--!=0) b=b+1; printf("a=%d,b=%d,c=%d\n",a,b,c); } a=4,b=5,c=8 阅读全文
posted @ 2023-02-08 19:24 myrj 阅读(15) 评论(0) 推荐(0) 编辑
摘要: //程序的功能是实现表达式z=( x>=y ? x : y),请将程序填写完整。 #include <stdio.h> main() { int x, y, z; printf("Please input x,y:"); scanf("%d%d",【1】); if 【2】 z=x; else 【3】 阅读全文
posted @ 2023-02-08 19:20 myrj 阅读(25) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> //判断指定字符是数字还是小写字母或大写字母或其他字符 main() {【1】 ch; printf("请输入一个字符"); scanf("【1】",【1】); if(【1】) printf("%c是大写字母",ch); else if(【1】) printf(" 阅读全文
posted @ 2023-02-08 15:49 myrj 阅读(741) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> //输入一元二次方程的系数a,b,c,判断是否有解,有几个解 main() {【1】 a,b,c,dt; printf("请输入一个a,b,c的值,a不能为0\n"); scanf("%f %f %f",【2】); dt=【3】; if(【4】) printf(" 阅读全文
posted @ 2023-02-08 15:40 myrj 阅读(256) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> //水仙花数:三位数的每个数字的立方和等于这个数, 判断某数是不是水仙花数 main() {【1】; printf("请输入一个水仙花数"); scanf("%d",【2】); g=【3】; s=【4】; b=【5】; if(【6】==x) printf("%d是 阅读全文
posted @ 2023-02-08 15:36 myrj 阅读(135) 评论(0) 推荐(0) 编辑
摘要: //任意输入三角形三边长,判断能否组成三角形,并求面积 【1】 【2】 main() {【3】 a,b,c,p,s; scanf("【4】",&a,&b,&c); if(【5】) {p=1/【6】*(a+b+c); s=sqrt(【7】); printf("三角形的面积是%f",s); } else 阅读全文
posted @ 2023-02-08 15:27 myrj 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main() {int x; printf("请输入一个整数"); scanf("%d",【1】); if(【1】) printf("%d能被3整除",x); else printf("%d不能被3整除",x); } #include<stdio.h> main( 阅读全文
posted @ 2023-02-08 15:21 myrj 阅读(270) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> //判断指定年份是闰年还是平年 main() {int year; printf("请输入年数"); scanf("%d",【1】); if(【2】) printf("%d年是闰年",year); else if(year%【3】==0) printf("%d年是 阅读全文
posted @ 2023-02-08 15:17 myrj 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 180 下一页