Re: C: Dividieren
Andre Heine <[email protected]>
| Newsgroups | gmane.linux.suse.programming |
|---|---|
| Message-ID | <[email protected]> |
Moin moin,
Am Freitag, 1. Oktober 2004 00:14 schrieb volker wirth:
> float z = (1 / 2);
> printf("%f", z);
>
> und er sagt mir: 0.000000
> Danke fÃŒr die Hilfe, habe wahrscheinlich ein ziemlich groÃes
> Brett vorm Kopf,
Mach mal so:
float z = 1;
float r = 2;
z = z/r;
printf("%2.3\n",z);
Ciao
Andre
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
[email protected]
Um eine Liste aller verfÃŒgbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]