Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int man,woman;
- float percm,percw;
- printf("Entre com o numero de homens:\n"); scanf("%d",&man);
- printf("Entre com o numeor de mulheres:\n"); scanf("%d",&woman);
- percm = (float)man/(man+woman);
- percw = (float)woman/(man+woman);
- printf("A porcentagem de homens na sala eh de %f porcento\nA porcentagem de mulheres na sala eh de %f porcento\n",percm*100,percw*100);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment