Article View: pl.comp.lang.c
Article #297817Re: float -> int - zaokrąglenie w górę i dół
From: Tomek[TK]
Date: Sun, 31 Jul 2011 18:53
Date: Sun, 31 Jul 2011 18:53
15 lines
1157 bytes
1157 bytes
On 31.07.2011 20:29, Zbych wrote:
> int round(double d)
> {
> return (d + 0.5);
> }
>
> Taka może być?
>
>
Troche nie bardzo bo nie zadziala poprawnie dla liczb ujemnych :)
--
pozdrawiam
Tomasz Krzos
Technical Details
Message-ID:
<j148as$m6c$3@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<j146e6$gmt$1@inews.gazeta.pl> <j1472l$jgp$1@news.mm.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: "Tomek[TK]" <tk-tk@NIESPAMOJwp.pl> Newsgroups: pl.comp.lang.c Subject: Re: float -> int - zaokrąglenie w górę i dół Date: Sun, 31 Jul 2011 20:53:15 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 15 Message-ID: <j148as$m6c$3@inews.gazeta.pl> References: <j146e6$gmt$1@inews.gazeta.pl> <j1472l$jgp$1@news.mm.pl> NNTP-Posting-Host: 80.238.77.37.ip.abpl.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1312138396 22732 80.238.77.37 (31 Jul 2011 18:53:16 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Sun, 31 Jul 2011 18:53:16 +0000 (UTC) X-User: tkrzos In-Reply-To: <j1472l$jgp$1@news.mm.pl> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110702 Icedove/3.0.11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit