that_one_nigga_you_k

problema do UNO

Jun 7th, 2023
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.09 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main(){
  4.  
  5.     char destino;
  6.     int pass;
  7.     float ida, volta;
  8.  
  9.     printf("digite as entradas: ");
  10.     scanf("%f %f %c %d", &ida, &volta, &destino, &pass);
  11.  
  12.     if(ida > 24 || volta>24 || ida<=0 || volta <= 0 || pass <= 0 || pass >9 || ida>volta) printf("Entrada Invalida");
  13.  
  14.     else{
  15.  
  16.         if(destino == 'A'){
  17.  
  18.             if((volta - ida) > 1 && pass <= 5) printf("O uninho faz a boa, obrigado querida mae line");          
  19.            
  20.             else if((volta - ida) >= 1.5 && pass <=9) printf("O uninho faz a boa, obrigado querida mae line");
  21.  
  22.             else{
  23.                 printf("Infelizmente o uninho nao tanka, rodamos!");
  24.             }
  25.         }
  26.  
  27.         if(destino == 'B'){
  28.             if((volta - ida) >= 0.75 && pass <= 5) printf("O uninho faz a boa, obrigado querida mae line");
  29.  
  30.             else if((volta - ida) >= 1.125 && pass <=9) printf("O uninho faz a boa, obrigado querida mae line");
  31.  
  32.             else{
  33.                 printf("Infelizmente o uninho nao tanka, rodamos!");
  34.             }
  35.         }
  36.     }
  37.  
  38.     return(0);
  39. }
Add Comment
Please, Sign In to add comment