会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
myrj
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
68
69
70
71
72
73
74
75
76
···
186
下一页
2023年2月10日
C语言填空:最大值函数
摘要: #include <stdio.h> //求两个数中的最大值 int max(int a,int b) { return 【1】; } main() { int a,b; scanf("%d%d",【2】); printf("max=%d",【3】); getchar(); } #include <
阅读全文
posted @ 2023-02-10 08:32 myrj
阅读(233)
评论(0)
推荐(0)
2023年2月9日
C语言填空:阶乘
摘要: #include <stdio.h> //求任意整数的阶乘 //如果输入3则输出3!=6 main() { int n,a,c=1; scanf("%d",&n); for(a=1;【1】;a++) c=【2】; printf("%d!=%d",【3】); getchar(); } #include
阅读全文
posted @ 2023-02-09 20:41 myrj
阅读(55)
评论(0)
推荐(0)
C语言填空:输出100-999间所有数字立方和等于本身的数
摘要: #include <stdio.h> //找出100-999间所有的Armstrong数 //Armstrong数:指这个3位数各位上数字的立方和等于自身 //371=3*3*3+7*7*7+1*1*1 main() { int i,a,b,c; for(i=100;i<=999;i++) { a=
阅读全文
posted @ 2023-02-09 20:03 myrj
阅读(296)
评论(0)
推荐(0)
c语言填空:两个数组计算
摘要: #include <stdio.h> //求出a中各相邻两个元素的和,并将这些和存放在数组b中 //按每行3个元素的形式输出。例如:b[1]=a[1]+a[0],....,b[9]=a[9]+a[8] main() { int a[10],b[10],i; printf("\nInput 10 nu
阅读全文
posted @ 2023-02-09 19:44 myrj
阅读(61)
评论(0)
推荐(0)
C语言填空:单词个数
摘要: #include <stdio.h> //输入一行英文,输出单词个数 #include <string.h> main() { char zf[101]; int a,b,【1】; 【1】; a=【1】; for(b=0;【1】;b++) if(zf[b]==【1】) c++; c=【1】; pri
阅读全文
posted @ 2023-02-09 15:25 myrj
阅读(42)
评论(0)
推荐(0)
C语言填空:数组 最大值 最小值
摘要: #include <stdio.h> //输入5个1-9之间的整数,输出其中的最大值和最小值 main() { int a[5],i,j,temp,【1】; for(i=0;i<5;i++) scanf("%d",&a[i]); for(i=0;i<4;i++) for(j=【1】;j<5;j++)
阅读全文
posted @ 2023-02-09 15:19 myrj
阅读(127)
评论(0)
推荐(0)
C语言填空:判断月份的天数
摘要: #include <stdio.h> //从键盘输入一个年份和月份,输出该月的天数 main() { int year,month; scanf("【1】",&year,&month); switch(month) { case 1: case 3: case 5: case 7: case 8:
阅读全文
posted @ 2023-02-09 15:09 myrj
阅读(580)
评论(0)
推荐(0)
C语言填空:删除数字字符
摘要: #include <stdio.h> //调用函数f,从字符串中删除所有的数字字符 asdf32asdfadsfds\0 数组 #include <string.h> void f(char *s) { int i=0; while(【1】) { if(s[i]>='0' && s[i]<='9')
阅读全文
posted @ 2023-02-09 10:36 myrj
阅读(247)
评论(0)
推荐(0)
C语言填空:多项式
摘要: #include <stdio.h> //调用函数计算代数多项式1.1+2.2*x+3.3*x*x+4.4*x*x*x+5.5*x*x*x*x //当x=1.7时的值 float f(float,float*,int) ; main() { float b[5]={1.1,2.2,3.3,4.4,5
阅读全文
posted @ 2023-02-09 10:28 myrj
阅读(71)
评论(0)
推荐(0)
C语言填空:整数倒置
摘要: #include <stdio.h> //程序功能:调用函数f,将一个整数首尾倒置 //如程序输入12345,则输出54321 // 如程序输入-12345,则输出-54321 #include <math.h> int f(int n) { int m,y=0;m=abs(n); while(m!
阅读全文
posted @ 2023-02-09 10:19 myrj
阅读(308)
评论(0)
推荐(0)
上一页
1
···
68
69
70
71
72
73
74
75
76
···
186
下一页
公告