Citation Envoyé par PNL
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
 
main()
{
    float nbr_1,nbr_2,nbr_3,somme,produit,moyenne;
    nbr_1==0.0;
    nbr_2==0.0;
    nbr_3==0.0;
    somme==0.0;
    produit==0.0;
    moyenne==0.0;
    printf("saisir 3 nombres :  ");
 
    printf("nombre 1 :  ");
    scanf("%f\n",&nbr_1);
 
    printf("nombre 2 :  ");
    scanf("%f\n",&nbr_2);
 
    printf("nombre 3 :  ");
    scanf("%f\n",&nbr_3);
 
    somme=nbr_1+nbr_2+nbr_3;
    produit=nbr_1*nbr_2*nbr_3;
    moyenne=(nbr_1+nbr_2+nbr_3);
    printf("%f,%f,%f",somme,produit,moyenne);
}
voilà ce que j'ai mis il s'arrête après la saisie des 3 nombres
Fait attention quand tu initialise tes variables ne met pas == mais l'opérateur d'affectation =