Advertisement
Igor2909

verifica 1

Jan 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. v#include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. main(){
  5.     int val; //valore da inserire
  6.     do
  7.     {
  8.    
  9.     printf("Inserisci il punteggio: ");
  10.     scanf("%d", &val);
  11.     if(val<=0 || val > 30)
  12.         {
  13.             printf("Il valore inserito non è valido.\n");
  14.         }
  15.    
  16.     } while (val<=0 || val >30);
  17.    
  18.     if(val>= 21 && val<=30)
  19.     {
  20.         printf("Hai passato l'esame e puoi registrarlo.\n");
  21.     }
  22.     else if(val>=16 && val <=20)
  23.     {
  24.         printf("Dovrai sostenere l'esame se vuoi passare. \n");
  25.     }
  26.     else if(val>=0 && val <16)
  27.     {
  28.         printf("Mi dispiace respinto!");
  29.     }
  30.     system("PAUSE");
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement