Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "Dr.UgoGagliardelli" <do.not.spam@me.please> |
|---|---|
| Newsgroups | it.comp.java |
| Subject | Re: perchè mi restituisce un intero? |
| Date | 2019-06-02 01:18 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <qcv15r$15ns$1@gioia.aioe.org> (permalink) |
| References | <qcuvcq$u82$1@gioia.aioe.org> |
Il 02.06.2019 00.48, Pino ha scritto: > Nel codice seguente,se assegno 10 e 3 ai due interi, la divisione mi > restituisce 3.0 anzichè 3.333333 > > Come mai? Perche' sia n1 che n2 sono interi, e la divisione per interi risulta sempre in un intero. Avresti dovuto fare: double divisione = ((double)n1)/n2;
Back to it.comp.java | Previous | Next — Previous in thread | Next in thread | Find similar
perchè mi restituisce un intero? Pino <utr1utr@gmail.com> - 2019-06-02 00:48 +0200
Re: perchè mi restituisce un intero? "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2019-06-02 01:18 +0200
Re: perchè mi restituisce un intero? Pino <utr1utr@gmail.com> - 2019-06-02 15:06 +0200
csiph-web