上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 188 下一页
摘要: #include <stdio.h> //数列的第1 2项值为1,此后各项值均为该项前二项之和,计算数列第30项的值 int f(int n); main() { printf("%d",【1】); getchar(); } int f(int n) { if(n==1 || n==2) 【2】; 阅读全文
posted @ 2023-02-08 20:26 myrj 阅读(82) 评论(0) 推荐(0)
摘要: #include <stdio.h> //将任意三个整数按 从小到大排序 void swap(【1】,【2】) { int temp; temp=*pa; *pa=*pb; *pb=temp; } main() { int a,b,c,temp; scanf("%d%d%d",&a,&b,&c); 阅读全文
posted @ 2023-02-08 20:19 myrj 阅读(256) 评论(0) 推荐(0)
摘要: #include <stdio.h> //求输入的整数各位数字之和。如输入234则输出9;输入-123则输出6 main() { int n,【1】; scanf("%d",&n) ; n=【2】; while(【3】) { s=s+【4】; n=【5】; } printf("%d",s); get 阅读全文
posted @ 2023-02-08 20:11 myrj 阅读(312) 评论(0) 推荐(0)
摘要: #include<stdio.h> //将任意10进制整数转化为2-16任意进制 int main() { char ku[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; int zh[32],i=0,w, 阅读全文
posted @ 2023-02-08 20:04 myrj 阅读(123) 评论(0) 推荐(0)
摘要: #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 阅读(124) 评论(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 阅读(58) 评论(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 阅读(102) 评论(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 阅读(83) 评论(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 阅读(1057) 评论(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 阅读(485) 评论(0) 推荐(0)
上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 188 下一页