Advertisement
Guest User

Codigo

a guest
Apr 24th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<locale.h>
  3.  
  4. int main(){
  5. setlocale(LC_ALL,"Portuguese");
  6. char Nome[50];
  7. int Nome1[5];
  8. double N1[5],N2[5];
  9. double Soma=0,Media[5];
  10. int i;
  11. int contA=0,contR=0;
  12. for (i=0;i<5;i++){
  13. printf("Digite o nome do aluno:\n");
  14. scanf("%s",&Nome);
  15. getchar();
  16. Nome1[i]=Nome;
  17. printf("Digite a nota da prova 1 desse aluno:\n");
  18. scanf("%lf",&N1[i]);
  19. printf("Digite a nota da prova 2 desse aluno:\n");
  20. scanf("%lf",&N2[i]);
  21. Media[i]=(N1[i]+N2[i])/2.0;
  22. }
  23. printf("\n\tRelatório de notas:\n\n");
  24. printf("Aluno\tProva 1\tProva 2\tMédia\tSituação\n");
  25. for (i=0;i<5;i++){
  26. printf("%s",Nome1[i]);
  27. printf("\t%.1lf\t%.1lf\t%.1lf\t",N1[i],N2[i],Media[i]);
  28. if (Media[i]>=7.0)
  29. printf("Aprovado\n");
  30. else
  31. printf("Reprovado\n");
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement