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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (int argc, char *argv[])
{
float Moy1 = 0, Moy2 = 0, Moy3 = 0, Moy4 = 0, Moy5 = 0, Moy6 = 0;
printf (" ---------------------------------------------------------------------- \n");
printf (" | |\n");
printf (" | CALCUL MOYENNE |\n");
printf (" | STI |\n");
printf (" | -------------------- |\n");
printf (" | |\n");
printf (" | |\n");
printf (" | I) Moyenne De Math? ");
scanf ("%f", &Moy1);
printf (" | |\n");
printf (" | II) Moyenne d'Elec? ");
scanf ("%f", &Moy2);
printf (" | |\n");
printf (" | III) Moyenne de Meca? ");
scanf ("%f", &Moy3);
printf (" | |\n");
printf (" | IV) Moyenne d'Anglais? ");
scanf ("%f", &Moy4);
printf (" | |\n");
printf (" | V) Moyenne de Physique? ");
scanf ("%f", &Moy5);
printf (" | |\n");
printf (" | VI) Moyenne de Philo? ");
scanf ("%f", &Moy6);
printf (" | |\n");
printf (" | |\n");
double MoyA = Moy1*4, MoyB = Moy2*9, MoyC = Moy3*6, MoyD = Moy4*2, MoyE = Moy5*7, MoyF = Moy6*2;
double MoyTotale = (MoyA + MoyB + MoyC+ MoyD + MoyE + MoyF);
double Resultat = (MoyTotale / 30);
printf (" | Votre Moyenne Generale est : %f", &Resultat);
printf (" | |\n");
printf (" ----------------------------------------------------------------------\n");
return 0;
} |
Partager