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
|
#include <stdio.h>
#include <conio.h>
void main ()
{
// *********Declaration et initialisation de tes variables*****
float intra=O, final=0, tps=0;
float x=0, y=0, z=0;
float moyenne=0, globale=0;
// ********Saisies de tes données********
printf("Entrez votre note Intra\n");//affiche sur l'ecran
scanf("%f", &intra);//affecte la valeur saisie dans la variable
printf("Entrez votre note final\n");
scanf("%f", &final);
printf("Entrez votre note tps\n");
scanf("%f", &tps);
moyenne = ((intra * 0,20) + (final * 0,40)) / 0,60;
if ((moyenne <40) && (tps > 50)) tps = 50; // Ta condition que tu as cité
globale = (0,20 * intra) + (0,40 * final) + (0,40 *tps) ;
printf("La note globale est : %f", globale);
getch();// Attente d'une touche pour fermer le programme
} |