- 级数求和
- 2016-11-20 21:00:41 @
#include <stdio.h>
int main()
{
int k,n=1;
double sn=0;
scanf("%d",&k);
while(sn<=k)
{
sn+=1.0/n;
n++;
}
printf("%d",n-1);
}
2 条评论
-
wennnnnn LV 7 @ 2016-11-20 21:03:05
int i=1;
while (i<2)
{ 666
} -
2016-11-20 21:03:03@
int i=1;
while (i<2)
{ 666
}
- 1