Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. /*Calcul de moyenne, et affichage de la mention*/
  3. main(void)
  4. {
  5. int nombrenotes, n, totalnotes, totalcoefficients, note, coefficient, moyenne;
  6. nombrenotes = nombrenotes + 1;
  7. printf("Bonjour. Combien de notes avez-vous à rentrer ?");
  8. scanf("%d",&nombrenotes);
  9.  
  10.  
  11.  
  12.  
  13.  
  14. for(n=0;n<nombrenotes;n++)
  15. {
  16.  
  17. printf(
  18. scanf("%d", &note)
  19. totalnotes = totalnotes + note
  20.  
  21.  
  22. scanf("%d",&coefficient)
  23. totalcoefficients = totalcoefficients + coefficient
  24.  
  25. }
  26.  
  27. moyenne = totalnotes/totalcoefficients
  28.  
  29.  
  30.  
  31.  
  32. }
  33. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement