|
|
back to boarduse printf("%d", int(ans+0.5)); RT Re: use printf("%d", int(ans+0.5)); thanks anyway. but i wonder why ceil(ans) doesnt work? Re: use printf("%d", int(ans+0.5)); You should round to nearest decimal number. E.g. if ans=sqrt(2) then you should print 1. Re: use printf("%d", int(ans+0.5)); Posted by Sunnat 25 Oct 2012 14:28 printf("%.0lf",ans); |
|
|