上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 27 下一页
摘要: //输出1000以内的水仙花数 #include <stdio.h> #include <math.h> int main(){ int a,b,c,s,i; printf("水仙花数如下:\n"); for(i=100;i<=999;i++){ a=i/100; b=(i/10)%10; c=i% 阅读全文
posted @ 2020-07-27 15:44 薄眠抛却陈年事。 阅读(904) 评论(0) 推荐(0) 编辑
摘要: /* 计算:1+2+3+.....n+1*1+2*2+..m*m+1/1+1/2+...1/k; */ #include <stdio.h> double add(int n){ double s1=0.0; for(int i=1;i<=n;i++){ s1+=i; } return s1; } 阅读全文
posted @ 2020-07-27 15:18 薄眠抛却陈年事。 阅读(209) 评论(0) 推荐(0) 编辑
摘要: /* 计算1!+2!+3!+4!+5!+.....+20! 计算1!+2!+3!+...+n!; */ #include <stdio.h> float fun(float n){ float i,s=0,a=1; for(i=1;i<=n;i++){ a=a*i; s=s+a; } return 阅读全文
posted @ 2020-07-27 15:06 薄眠抛却陈年事。 阅读(298) 评论(0) 推荐(0) 编辑
摘要: /*计算s=2+22+222+2222......的值*/ //验证:n=5,s=2+22+222+2222+22222=24690 #include <stdio.h> int main(){ int i,n,a=0,s=0; printf("计算s=2+22+222+2222+....的值,现在 阅读全文
posted @ 2020-07-27 14:59 薄眠抛却陈年事。 阅读(643) 评论(0) 推荐(0) 编辑
摘要: //China!转化为Glmre! #include <stdio.h> int main(){ char c; while((c=getchar())!='\n'){ if(c>='a'&&c<='z'||c>='A'&&c<='Z'){ if(c>='w'&&c<='z'||c>='W'&&c< 阅读全文
posted @ 2020-07-27 14:19 薄眠抛却陈年事。 阅读(456) 评论(0) 推荐(0) 编辑
摘要: /*按公式计算pi的值:pi/4=1-1/3+1/5-1/7......*/ #include <stdio.h> #include <math.h> int main(){ double pi,s=0; double a=-1.0; int i=1; for(;fabs(a/i)>1e-6;){/ 阅读全文
posted @ 2020-07-27 14:07 薄眠抛却陈年事。 阅读(867) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> //键盘任意输入一个整数,判断其是否为素数 int main(){ int n,i,flag=1; printf("请任意输入一个整数,判断其是否为素数:"); scanf("%d",&n); for(int i=2;i<=s 阅读全文
posted @ 2020-07-27 13:57 薄眠抛却陈年事。 阅读(2441) 评论(0) 推荐(0) 编辑
摘要: /* 求两个不同正整数的最大公约数和最小公倍数 */ #include <stdio.h> int max_gys(int m,int n); int min_gbs(int m,int n); int main(){ int m,n; int gys,gbs; printf("请输入2个不同的正整 阅读全文
posted @ 2020-07-27 13:03 薄眠抛却陈年事。 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 目录 一、设计目的、意义 二、设计分析 三、方案分析 四、功能模块实现 五、设计体会 六、源代码 一、设计目的、意义 1.通过模拟文件系统的实现,深入理解操作系统中文件系统的理论知识, 加深对教材中的重要算法的理解。同时通过编程实现这些算法,更好地掌握操作系统的原理及实现方法,提高综合运用各专业课知 阅读全文
posted @ 2020-05-19 15:47 薄眠抛却陈年事。 阅读(1037) 评论(0) 推荐(2) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-16 23:36 薄眠抛却陈年事。 阅读(0) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 27 下一页