Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Slide - Página 24 - Exercício 1
- #include<stdio.h>
- #include<locale.h>
- int main(){
- setlocale(LC_ALL,"Portuguese");
- int nota;
- printf("Entre com sua nota (base 100): ");
- scanf("%d",¬a);
- printf("Seu conceito foi: ");
- switch (nota){
- case 0 ... 49:
- printf("D");
- break;
- case 50 ... 69:
- printf("C");
- break;
- case 70 ... 89:
- printf("B");
- break;
- case 90 ... 100:
- printf("A");
- break;
- default:
- printf("Valor inválido.");
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment