Article View: es.comp.os.linux.programacion
Article #11212Re: problemas con C
From: Luis Angel Fernández Fernández
Date: Fri, 21 Dec 2001 08:21
Date: Fri, 21 Dec 2001 08:21
36 lines
2148 bytes
2148 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hola
Xavier Montero wrote:
>> > resultante=dni/23;
>> > resultantedos=resultante*23;
>> > resultantetres=dni-resultantedos;
>>
>> Esto... �seguro que es esto lo que hay que hacer?... salvo que me est�
>> apijotando en algo... resultantetres... �no es siempre cero? (bug del
>> Pentium aparte ;-)).
>
> Si resultante es tipo "int" entonces es lo mismo que sacar
> m�dulo...
>
> resultantetres = dni % 23;
>
> ...y nos ahorramos las operaciones intermedias.
Oops, metedura de pata :(
Ta llueu
- --
Clave GPG: http://muxin.yi.org:2080
http://muxin.dhis.org:2080
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8IvEKsrzbHhG/hp8RAkPLAJ9LoHyXvdQabWK9ZmbqiwBx9HDsowCeNJ/N
BpfyMW69U+ev2bLXm9+rj2A=
=A2mF
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<3c22f0e8@filemon.telecable.es>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!filemon.telecable.esReferences:
<ab4993a4.0112141425.1c82dbad@posting.google.com> <3c222dcb@filemon.telecable.es> <3C228306.2972FE0A@dsitelecom.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,108ef0ba0c562fe9 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-12-21 00:21:23 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!filemon.telecable.es From: Luis Angel Fernández Fernández <koxo@wanadoo.es> Newsgroups: es.comp.os.linux.programacion Subject: Re: problemas con C Date: Fri, 21 Dec 2001 09:21:32 +0100 Organization: None Lines: 37 Message-ID: <3c22f0e8@filemon.telecable.es> References: <ab4993a4.0112141425.1c82dbad@posting.google.com> <3c222dcb@filemon.telecable.es> <3C228306.2972FE0A@dsitelecom.com> Reply-To: koxo@wanadoo.es NNTP-Posting-Host: filemon.telecable.es Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: titan.bt.es 1008922470 11535 212.89.0.4 (21 Dec 2001 08:14:30 GMT) X-Complaints-To: abuse@bt.es NNTP-Posting-Date: 21 Dec 2001 08:14:30 GMT User-Agent: KNode/0.6.1 X-Original-NNTP-Posting-Host: cm03644.telecable.es X-Original-Trace: 21 Dec 2001 09:20:58 +0100, cm03644.telecable.es