Guest User

Untitled

a guest
Dec 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3.  
  4. int main()
  5. {
  6. float calif_1=0,calif_2=0,calif_3=0,promedio=0;
  7. printf("\nIntroduce tu primera nota: ");scanf("%f",&calif_1);
  8. printf("\nIntroduce tu segunda nota: ");scanf("%f",&calif_2);
  9. printf("\nIntroduce tu tercera nota: ");scanf("%f",&calif_3);
  10.  
  11. promedio=(calif_1+calif_2+calif_3)/3;
  12.  
  13. if(promedio<6)
  14. {
  15. printf("\n\tA la recuperacion con un %.2f no es aprobatorio",promedio);
  16. }
  17. else
  18. {
  19. printf("\n\tEnorabuena chaval, has sacado un %.2f",promedio);
  20. }
  21.  
  22. getch();
  23. }
Add Comment
Please, Sign In to add comment