上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 180 下一页
摘要: #include <stdio.h> //求s=1+2+3+4+...+100 main() { int a=101,【1】; while(【2】,a>0) s【3】=【4】; printf("s=%d",s); getchar(); } #include <stdio.h> //求s=1+2+3+ 阅读全文
posted @ 2023-02-10 09:20 myrj 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //执行下列程序段后,y的值是(),x的值是(), m的值是(),n的值是() main() { int x,y,z,m,n; m=10;n=5; x=(--m==n++)?--m:++n; y=m++; getchar(); } #include <stdio 阅读全文
posted @ 2023-02-10 08:50 myrj 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(68) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(327) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 180 下一页