2017_0117
来源:互联网 发布:周泓旭 知乎 编辑:程序博客网 时间:2024/05/13 22:26
2017-0117
1 )100以内能被5或7整除的数,每行5个显示出来
#include <stdio.h>
int main()
{
int i,n;
for(i = 1 , n = 0 ;i <= 100 ; i ++)
if ( i % 7 == 0 || i % 5 == 0)
{
printf( " %d\t ", i );
n++;
if ( n%5 == 0)
printf ( " \n ");
}
printf( " \n ");
return 0;
}
2 e的近似值 1+1/1!+1/2!+...+1/n! 当1/n! < 1e-5时,条件不成立
include<stdio.h>
int main()
{double sum = 1.0 , d = 1 , j = 1 , e = 1.0 ;
while ( d >1e-6 )
{
sum *= j ;
d = 1.0 / sum ;
e += d;
j++;
}
printf( " %f " ,e );
return 0 ;
}
0 0
- 2017_0117
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- 2017
- springmvc工作原理
- Linux内核IP Queue机制的分析(一)
- 自定义控件其实很简单 六
- 彻底深刻理解js原型链之prototype,__proto__以及constructor(一)
- windows下php和apache安装
- 2017_0117
- eclipse-jee 如何修改黑色主题
- 51nod-1535 深海探险
- 2017_0118
- 一些Setup Factory 教程的链接
- 维纳过程(Wiener Process)与高斯过程(Gaussian Process)
- php对象转换成字符串
- Servlet、ServletConfig和ServletContext
- Hibernate异常No row with the given identifier exists 解决方法