Thursday 30 August 2012

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.


main()
{
 long t,m,w,lm,lw,l,im,iw;
 t=80000;
 m=80000*52/100;
 w=t-m;
 lm=t*35/100;
 l=t*48/100;
 lw=l-lm;
 im=m-lm;
 iw=w-lw;
 printf("Total population = %ld\n",t);
 printf("Total men = %ld\n",m);
 printf("Total women = %ld\n",w);
 printf("Total literate men = %ld\n",lm);
 printf("Total  literate women = %ld\n",lw);
 printf("Total illiterate men = %ld\n",im);
 printf("Total illiterate women = %ld\n",iw);
}

output:-

4 comments:

  1. thanx it was quite helpfull

    ReplyDelete
  2. pmen=52
    ptl=48
    pml=35
    pwl=ptl-pml
    tm= (52*80000)/100
    tw=80000-tm
    lm=(35*tm)/100
    lw=(13*tw)/100
    ilm=tm-lm
    ilw=tw-lw
    print(ilm)
    print(ilw)

    Why is this wrong?

    ReplyDelete