Run Code
|
API
|
Code Wall
|
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
18BCE2182 ASSESS_1 Q1-2
Spring 2017 Project 2 v1
date diff sample
Hello world!
B_141111_Divisores
multiplication
pointer
C Pointers Experiment (So bad don't use)
MULTI-CAST
Beginning linux