Reginaldojs

exercicio 22,lista 01

May 15th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.    float eleit, vB, vN, vV, porcB, porcN, porcV ;
  4.    printf("Entre com o total de eleitores de seu municipio:");
  5.    scanf("%f", &eleit);
  6.    printf("Entre com o total de votos brancos calculados:");
  7.    scanf("%f", &vB);
  8.    printf("Entre com o total de votos nulos calculados:");
  9.    scanf("%f", &vN);
  10.    printf("Entre com o total de votos validos calculados:");
  11.    scanf("%f", &vV);
  12.          porcB = (vB*100)/eleit;
  13.          porcN = (vN*100)/eleit;
  14.          porcV = (vV*100)/eleit;
  15.    printf("No seu municipio foi constado %f porcento de votos brancos %f porcento de votos nulos e %f porcento de votos validos", porcB, porcN, porcV);
  16.    return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment