Problème affichage nombres décimaux en C
Résolu/Fermé
zatox
zatox
- Messages postés
- 641
- Date d'inscription
- samedi 17 février 2007
- Statut
- Membre
- Dernière intervention
- 26 juin 2020
zatox
- Messages postés
- 641
- Date d'inscription
- samedi 17 février 2007
- Statut
- Membre
- Dernière intervention
- 26 juin 2020
A voir également:
- Problème affichage nombres décimaux en C
- Problème affichage nombres décimaux en C ✓ - Forum - C
- Comment convertir un nombre décimal en heure ✓ - Forum - Programmation
- Algorithme convertir un nombre décimal en binaire pdf ✓ - Forum - Programmation
- Vba convertir texte en nombre décimal ✓ - Forum - VB / VBA
- Comment convertir un nombre décimal en hexadécimal ✓ - Forum - Programmation
2 réponses
KX
22 févr. 2012 à 14:52
- Messages postés
- 16529
- Date d'inscription
- samedi 31 mai 2008
- Statut
- Modérateur
- Dernière intervention
- 19 mai 2022
22 févr. 2012 à 14:52
Lorsque tu fais moyenne = somme / nb_postes_different_0; tu divises un entier par un entier, et ça te renvoie un entier (ici 13). A priori il faudrait que somme soit double pas int !
zatox
23 févr. 2012 à 00:02
- Messages postés
- 641
- Date d'inscription
- samedi 17 février 2007
- Statut
- Membre
- Dernière intervention
- 26 juin 2020
23 févr. 2012 à 00:02
Bonsoir KX, oui super c'est ça merci pour ton aide, avec somme définit comme type double, ça marche.