Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main()
- {
- int people,white,null;
- float pwhite,pnull;
- printf("Entre com o total de eleitores : \n"); scanf("%d",&people);
- printf("Entre com o total de votos brancos : \n"); scanf("%d",&white);
- printf("Entre com o total de votos nulos : \n"); scanf("%d",&null);
- pwhite = (float)white/(float)people;
- pnull = (float)null/(float)people;
- printf("Votos em branco = %f porcento do total.\nVotos nulos = %f porcento do total.",pwhite*100,pnull*100);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment