victorialais

Categoria Jogador

May 27th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include<stdio.h>
  2. #define _STRING_H
  3. #include <stddef.h>
  4. #include<stdlib.h>
  5. #include <locale.h>
  6. int main() {
  7.    setlocale(LC_ALL, "Portuguese");
  8.    int idade;
  9.    
  10.    
  11.    
  12.    printf("Digite a idade do jogador:");
  13.    
  14.    scanf("%d", &idade);
  15.    
  16.  
  17.    
  18.  
  19.    if (5 <= idade && idade <= 11) {
  20.      
  21.         printf("O jogador é da categoria INFANTIL \n\n");
  22.    
  23.        
  24.    }
  25.    
  26.     else if (12 <= idade && idade <= 17) {
  27.           printf("O jogador é da categoria JUVENIL \n\n");
  28.           }
  29.          
  30.    else if ( idade >= 18){
  31.      
  32.       printf("O jogador é da categoria ADULTO \n\n");
  33.      
  34.    }
  35.    else {
  36.    
  37.           printf("Não há categorias pra essa idade \n\n");
  38.           }
  39.    
  40.    
  41.    system("PAUSE");
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment