Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /*Calcul de moyenne, et affichage de la mention*/
- main(void)
- {
- int nombrenotes, n, totalnotes, totalcoefficients, note, coefficient, moyenne;
- nombrenotes = nombrenotes + 1;
- printf("Bonjour. Combien de notes avez-vous à rentrer ?");
- scanf("%d",&nombrenotes);
- for(n=0;n<nombrenotes;n++)
- {
- printf(
- scanf("%d", ¬e)
- totalnotes = totalnotes + note
- scanf("%d",&coefficient)
- totalcoefficients = totalcoefficients + coefficient
- }
- moyenne = totalnotes/totalcoefficients
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement