plz someone help.

is my code/algo ok?

Code: Select all

```
#include<stdio.h>
#include<math.h>
int main()
{
unsigned long long x;
long long n;
long long a,b,c;
int ncase=1;
while(scanf("%llu",&x)==1)
{
if(x==0)
break;
a=1;
b=-3;
c=(-2)*x;
n=(int)((-b+sqrt(b*b-4*a*c))/2*a);
n=n+1;
printf("Case %d: %lld\n",ncase,n);
ncase++;
}
return 0;
}
```