Sunday, April 12, 2009

Percentage of Literate & Illiterate along with men & women in town

/*In a town, the percentage of men is 52. The percentage of
total literacy is 48. If total percentage of literate men is 35 of
the total population, write a program to find the total number
of illiterate men and women if the population of the town is
80,000*/

Solution Code:-
===========
/*popmen = population of men,popwo = population of women ,literate women = ilwo,ilmen = ill-literate men,limen = literate men,liwo = literate women,li= literate men*/

#include <stdio.h>
int main(void)
{
int popmen,popwo,ilmen,ilwo,li,limen,liwo,total;
popmen = (80000 * 52)/100;
printf("\nTotal population of Men in town is %d out of 80000",popmen);
popwo = (80000 - popmen);
printf("\nTotal population of women in town is %d out of 80000",popwo);
li = ( 80000 * 48)/100;
printf("\nTotal literate population in town is %d",li);
limen = ( popmen * 35 )/100;
printf("\nTotal amount of literate Men are %d",limen);
ilmen = popmen - limen;
printf("\nTotal amount of Ill-literate Men are %d",ilmen);
liwo = li - limen ;
printf("\nTotal amount of Literate women is %d",liwo);
ilwo = popwo - liwo ;
printf("\n Total amount of Ill-literate women is %d",ilwo);

return 0;
}

No comments: