Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
switch_nota
//Title of this code ole ole ole cholo simeone #include <stdio.h> #include <math.h> int main(void) { double nota; printf("Dime tu nota: "); scanf(" %lf", ¬a); switch((int)floor(nota)) { case 0: case 1: case 2: case 3: case 4: printf("SUSPENSO\n"); break; case 5: case 6: printf("APROBADO\n"); break; case 7: case 8: printf("NOTABLE\n"); break; case 9: case 10: printf("SOBRESALIENTE\n"); break; default: printf("NOTA ERRONEA\n"); } printf("\n\n\n\n\n"); printf("%s", nota < 0 ? "NOTA ERRONEA" : nota < 5 ? "SUSPENSO" : nota < 7 ? "APROBADO" : nota < 9 ? "NOTABLE" : nota <= 10 ? "SOBRESALIENTE" : "NOTA ERRONEA"); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Funciones en C
p20
Incometax problem v0.1
recurs2
2
intro coding hello world
Project 3 Part 1 v1.0
A_141205_ContadorPalabras
Assignment 10
2
Please log in to post a comment.