Last active
June 25, 2017 11:17
-
-
Save Ambratolm/d7f7d1c8399a0bb984fe78d79f0aebfb to your computer and use it in GitHub Desktop.
Ecrire l’algorithme qui permet de lire 3 notes d’un étudiant et qui calcul et affiche la moyenne par la suite.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
printf("Moyenne de trois notes:\n"); | |
printf("--------------------------------\n"); | |
float a,b,c,M; | |
printf("Entrez la note 1: "); | |
scanf("%f",&a); | |
printf("Entrez la note 2: "); | |
scanf("%f",&b); | |
printf("Entrez la note 3: "); | |
scanf("%f",&c); | |
printf("--------------------------------\n"); | |
M=(a+b+c)/3; | |
printf("La note moyenne est: %f\n", M); | |
printf("--------------------------------\n"); | |
system("pause"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment