Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v#include <stdio.h>
- #include <stdlib.h>
- main(){
- int val; //valore da inserire
- do
- {
- printf("Inserisci il punteggio: ");
- scanf("%d", &val);
- if(val<=0 || val > 30)
- {
- printf("Il valore inserito non è valido.\n");
- }
- } while (val<=0 || val >30);
- if(val>= 21 && val<=30)
- {
- printf("Hai passato l'esame e puoi registrarlo.\n");
- }
- else if(val>=16 && val <=20)
- {
- printf("Dovrai sostenere l'esame se vuoi passare. \n");
- }
- else if(val>=0 && val <16)
- {
- printf("Mi dispiace respinto!");
- }
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement