victorialais

Calculo da média anual

Sep 24th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. main ()
  5.  
  6. {
  7. float nota1,nota2,nota3,nota4,media;
  8. printf ("Digite a primeira nota = ");
  9. scanf ("%f", &nota1);
  10. printf ("Digite a segunda nota = ");
  11. scanf ("%f", &nota2);
  12. printf ("Digite a terceira nota = ");
  13. scanf ("%f", &nota3);
  14. printf ("Digite a quarta nota = ");
  15. scanf ("%f", &nota4);
  16. media = (2*nota1+ 2*nota2+ 3*nota3+ 3*nota4) / 10;
  17. printf ("Sua media e = %f", media);
  18. getch ();
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment