nikolas_serafini

Lista 2 - Exercício 3

May 24th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int age;
  7.    
  8.     printf("Insira a idade do individuo :\n"); scanf("%d",&age);
  9.  
  10.     if (age<16)
  11.     {
  12.         printf("Individuo nao pode votar!\n");
  13.         return 0;
  14.     }
  15.  
  16.     else if (((age>=16)&&(age<=17))||(age>70))
  17.     {
  18.         printf("O voto eh facultativo!\n");
  19.         return 0;
  20.     }
  21.  
  22.     else
  23.     {
  24.         printf("O voto eh obrigatorio!\n");
  25.         return 0;
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment