alen__ @ 2018-01-30 16:40:24
#include <stdio.h>
#include <stdlib.h>
int main()
{
float s=0;
int a=1,b;
scanf("%d",&b);
while(s<=b)
{
s += (1/a);
a++;
}
printf("%d",a-1);
}
by Kirisame_Marisa_ @ 2018-01-30 17:07:21
整数除法
by Loner_Knowledge @ 2018-01-30 17:38:06
@alen__
a是整形,整形除整形是整除不留小数的
by 赤黒 @ 2018-03-15 22:09:18
加个 reutrn 0;