求助为什么出错了
#include <stdio.h> int main() { float S=1.0; int k; int n=1; scanf("%d",&k); for(;S<=k;n++){ S+=1.0/n; } printf("%d",n); return 0; }
只有最后一个绿