[ create a new paste ] login | about

Link: http://codepad.org/MLWLvw17    [ raw code | output | fork ]

C, pasted on Nov 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>

int main() {
  int idade;
  printf("Digite a sua idade: \n");
  scanf("%d", &idade);

  if((idade>=16 && idade<18) || (idade>70)){
    printf("Voto facultativo \n");
  } 
   if (idade>=18 && idade<70){
   printf ("Voto obrigatorio \n");
  }
  
  return 0;
}


Output:
1
2
Digite a sua idade: 
Voto facultativo 


Create a new paste based on this one


Comments: