Why i am still not getting output...though no errors

#include
using namespace std;
int main()
{
int n;
float k=1.0,sum=0.0;
cin>>n;
label:
for(int i=0;;i=i+k)
{
if((i*i)>n)
{
i=i-k;
sum=sum+i;
k=k/10;
if(k==0.01)
{
goto end;
}
else goto label;
}
}
end:
cout<<"\n"<<sum;
return 0;
}

Hey @prerak_semwal
Check this

I already corrected ur code

Hey @prerak_semwal
Please reply if this resolves ur doubt
Or if u are not able to undestand something

Hey @prerak_semwal
I am not able to figure out wht its not running for 20
you can reopen this same thread
Just revoke reopen

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.