Reginaldojs

exercicio 4,lista 1

Apr 25th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.         int totalalunos,homens,mulheres,porcentoh,porcentom;
  4.         printf("digite o total de homens:");
  5.         scanf("%d",&homens);
  6.         printf("digite o total de mulheres:");
  7.         scanf("%d",&mulheres);
  8.               totalalunos=homens+mulhers;
  9.               porcentoh=(homens*100)/totalalunos;
  10.               porcentom=(mulheres*100)/totalalunos;
  11.         printf("a porcentagem de homens e %d",porcentoh);
  12.         printf("a porcentagem de mulheres e %d",porcentom);
  13.         return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment