Advertisement
Nayeemzaman

Untitled

Oct 16th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. float a,b,c,d,x,e,z;
  5. scanf("%f %f %f %f",&a,&b,&c,&d);
  6. x=(a*2+b*3+c*4+d*1)/10;
  7. printf("Media: %.1f\n",x);
  8. if(x>=7.0){
  9. printf("Aluno aprovado\n");
  10. }
  11. else if(x<=5.0){
  12. printf("Aluno reprovado\n");
  13. }
  14. else if(x>=5.0&&x<=6.9){
  15. printf("Aluno em exame\n");
  16. }
  17. scanf("%f",&e);
  18. printf("Nota do exame: %.1f\n",e);
  19. z=(x+e)/2;
  20. if(z>=5.0){
  21. printf("Aluno aprovado\n");
  22. }
  23. else if(z<=4.9){
  24. printf("Aluno reprovado\n");
  25. }
  26. printf("Media final: %.1f\n",z);
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement