GJPassos

APS 01 EX 01 ALGORITMOS 02

May 15th, 2013
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. //APS 01 EX 01
  2. //ALGORITMOS 02 PROF MALGARETE - CENTRO TECNOLOGICO UNIVERSIDADE POSITIVO
  3. //GILMAR JUNIOR DOS PASSOS
  4.  
  5. #include "stdlib.h"
  6.  #include "conio.h"
  7.  #include "stdio.h"
  8.  #include "string.h"
  9.  #include "locale.h"
  10.  
  11. void main()
  12. {
  13.     setlocale(LC_ALL, "Portuguese");
  14.    
  15.     int nota, somatorio, media, cont;
  16.    
  17.  
  18.     nota=0;
  19.     somatorio=0;
  20.     media=0;
  21.  
  22.     for (cont=1;cont<=3;cont++)
  23.     {
  24.     printf ("Entre com a nota do aluno:\n");
  25.     scanf ("%d",&nota);
  26.     somatorio = nota + somatorio;
  27.     }
  28.     media = somatorio / 3;
  29.     printf ("A média de notas do aluno é:\n");
  30.         printf("%d",media);
  31.  
  32.         getch ();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment