|
|
вернуться в форумuse 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)); Послано Sunnat 25 окт 2012 14:28 printf("%.0lf",ans); |
|
|