Article View: chile.comp.programacion
Article #3584Re: funcion round en C
From: Rick_oj
Date: Thu, 09 Dec 2004 21:00
Date: Thu, 09 Dec 2004 21:00
29 lines
1659 bytes
1659 bytes
joe wrote:
> joe <joe@anonymous.nu> wrote:
>> Hola
>>
>> Tengo el siguiente problema con la funcion round.
>> El programa.
>>
>> /***** round.c *****/
>> #include <stdio.h>
>> #include <math.h>
>>
>> int main ()
>> {
>> double x = 1.234, y;
>> y = round(x);
>> printf("El valor redondeado de %f es %f.\n", x,y);
si x es double no deberia ser %f sino que %d, eso es lo que le veo a simple
inspeccion
>> return 0;
>> }
>> /***** end ****/
>
> [...]
>
> Umm, cambie round(3) por rint(3) y funciona... Que onda con la funcion
> round(3), esta siendo desaprobada (para no decir "deprecada", palabra
> que no existe, AFAIK)?
>
> Saludos.
Technical Details
Message-ID:
<cpaeaa$ssh$1@news1.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!feeder2.cambrium.nl!feed.tweaknews.nl!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mailReferences:
<cpa338$p9o$1@news1.nivel5.cl> <cpa3k5$p9o$2@news1.nivel5.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,45a58cbd8a22477a X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!feeder2.cambrium.nl!feed.tweaknews.nl!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail From: "Rick_oj" <rick_oj@servidor.red> Newsgroups: chile.comp.programacion Subject: Re: funcion round en C Date: Thu, 9 Dec 2004 18:00:00 -0300 Organization: Varios Lines: 31 Message-ID: <cpaeaa$ssh$1@news1.nivel5.cl> References: <cpa338$p9o$1@news1.nivel5.cl> <cpa3k5$p9o$2@news1.nivel5.cl> NNTP-Posting-Host: cm-vina4-157-154.cm.vtr.net X-Trace: news1.nivel5.cl 1102625930 29585 200.104.157.154 (9 Dec 2004 20:58:50 GMT) X-Complaints-To: news@news1.nivel5.cl NNTP-Posting-Date: Thu, 9 Dec 2004 20:58:50 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441