Created
February 24, 2017 20:29
-
-
Save FelipeGrijo/e0b17f13ad53470b2ccfb95063c0f3ae to your computer and use it in GitHub Desktop.
13) Faça um programa que leia a idade de uma pessoa e informe a sua classe eleitoral: - não eleitor (abaixo de 16 anos) - eleitor obrigatório ( entre 18 e 65 anos) - eleitor facultativo ( entre 16 e 18 anos e maior de 65 anos)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://gist.github.com/FelipeGrijo | |
#include <stdio.h> | |
int main(){ | |
int Idade=0; | |
printf("Digite idade:"); | |
scanf("%d",&Idade); | |
if(Idade>18 && Idade<=65){ | |
printf("Eleitor obrigatorio\n"); | |
} | |
else if(Idade>=16 && Idade<=18 || Idade>65){ | |
printf("Eleitor facultativo\n"); | |
} | |
else | |
{ | |
printf("Nao eleitor\n"); | |
} | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment