Thursday 5 July 2012

Basic C Programming010

In a town, the percentage of men is fifty two. The percentage of total literacy is forty eighty. If total percentage of literate men is thirty five of the total population, write a program to find the total number of illiterate men and women if the population of the town is eighty thousand. 


#include <stdio.h>
#include <conio.h>
void main ( )
{
         long       tl, lm, ilm, m, w, lw, ilw ,tp = 80000;
         clrscr( );
                          
         m = tp * 52 / 100;                          /* Total men */
         w = tp - m;                                     /* Total women */
         tl = tp * 48 / 100;                           /* Total literacy */
         lm = tp * 35 / 100;                         /* Literate men */
         ilm = m - lm;                                   /* Illiterate men */
         lw = tl - lm;                                     /* Literate women */
         ilw = w - lw;                                   /* Illiterate women */
                 
         printf("\n\n\t\t Total illiterate women= %ld \n\n\n\t\t Total illiterate men= %ld", ilw , ilm);
         getch( );
}
Click here to contact us 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...