-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSwitch.c
More file actions
36 lines (30 loc) · 685 Bytes
/
Copy pathSwitch.c
File metadata and controls
36 lines (30 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/***
Ejercicio 10: Dada una nota en el rango (A-F), mostrar un mensaje si la nota es:
Muy mal (F), Mal (E), Bien (D), Muy bien (C), Excelente (A y B).
***/
#include <stdio.h>
int main(int argc, char *argv[]) {
char nota;
printf("Ingrese la nota (A-F): ");
scanf("%c", ¬a);
switch(nota){
case 'A': case 'B':
printf("Su nota es excelente\n");
break;
case 'C':
printf("Su nota es muy buena\n");
break;
case 'D':
printf("Su nota es buena\n");
break;
case 'E':
printf("Su nota es mala\n");
break;
case 'F':
printf("Su nota es muy mala\n");
break;
default:
printf("La letra de la nota ingresada no es valida\n");
}
return 0;
}