我不理解为什么要等到a的立方大于n时才输出,逆天
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
#include <stdio.h> int main(){ double gen,n,a=0;int tap=1; scanf("%lf",&n); if(n<0){n=-n;tap=0;} while(1){ if(a*a*a>n){ if(tap==0) printf("-%.1f",a); else printf("%.1f",a); break; } a+=0.01; } return 0; }