Tuesday, 24 December 2013

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 an algorithm to find the total number of illiterate men and women if the population of the town is 80,000.(c++ code)

#include<iostream>
using namespace std;
#include<conio.h>
int 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;
  cout<<"Total population = "<<t;
  cout<<"\nTotal men = "<<m;
  cout<<"\nTotal women = "<<w;
  cout<<"\nTotal literate men = "<<lm;
  cout<<"\nTotal  literate women = "<<lw;
  cout<<"\nTotal illiterate men = "<<im;
  cout<<"\nTotal illiterate women = "<<iw;
  getche();
 return 0;

  /*  Letuswithc:

       this page is designed to help you learn C or C++.
  Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks. 
         */
         }

2 comments: