(j) 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.

Let Us C by Yashwant Kanetkar

 

Solution By Muhammad Kaleem UIlah



                                                                  Exercise Questions 
[H] Write C programs for the following:

(j) 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.

int main ()

{

    int pop,percentagemen,percentagewomen;

int percentageliteracy,percentageliteratemen,

      percentageliteratewomen,numofmen,numofwomen;

    int numofliteratemen,numofliteratewomen,numofillitratemen,numofillitratewomen;

    pop=80000;  //given

    percentagemen=52; //given

    percentagewomen=48;  //100-52=48

    percentageliteracy=48; //given

    percentageliteratemen=35; //given

    percentageliteratewomen=13; //48-35=13

    numofmen=(pop/100)*52;

    numofwomen=pop-numofmen;

    numofliteratemen=(numofmen/100)*35;

    numofliteratewomen=(numofwomen/100)*13;

    numofillitratemen=numofmen-numofliteratemen;

    numofillitratewomen=numofwomen-numofliteratewomen;

    printf("\n\t\t Number of illitrate Men = %d",numofillitratemen);

    printf("\n\t\t Number of illitrate Women = %d\n",numofillitratewomen);

    return 0;

}


Comments

Popular posts from this blog

(k) A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard in hundreds, find the total number of currency notes of each denomination the cashier will have to give to the withdrawer.

EXERCISE 01 Complete Solved LET US C by Yashwant Kanetkar