Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2. int main (){
  3. //se declara la variable nota que se calificará como suspenso, aprobado, notable o sobresaliente
  4. int nota;
  5. //se pide introducir la nota por teclado
  6. printf("Introduzca la nota obtenida\n");
  7. //se asigna el valor de la nota introducida a la vaiable nota
  8. scanf("%d", &nota);
  9. //se compara el valor obtenido con los valores de las distintas calificaciones
  10. if ((nota == 5)||(nota == 6)){
  11. printf("Aprobado\n");
  12. }
  13. else {
  14. if ((nota==7)|(nota==8)) {
  15. printf("Notable\n" );
  16. }
  17. else{
  18. if ((nota==9)|(nota=10)){
  19. printf("Sobresaliente\n");
  20. }
  21. else{
  22. printf("Supenso\n");
  23. }
  24. }
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement