C++ Chapters

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.

Structure of C++ Programs - Overview
#include <iostream>
using namespace std;

int main()
{
    int Pop = 80000, Pop_Men, Pop_Women, Pop_Lit, Lit_Men, Lit_Women, Illit_Men, Illit_Women;
    
    Pop_Men = (52 * Pop) / 100;
   
    Pop_Women = Pop - Pop_Men;
   
    Pop_Lit = (48 * Pop) / 100;
   
    Lit_Men = (35 * Pop) / 100;
   
    Lit_Women = Pop_Lit - Lit_Men;
   
    Illit_Men = Pop_Men - Lit_Men;
   
    Illit_Women = Pop_Women - Lit_Women;
    
    cout << "\t\t\t\tDATA\n";
    cout << "_______________________________________________\n\n";
    cout << "Total Population of City            :\t" << Pop << "\n";
    cout << "Total Population of Men             :\t" << Pop_Men << "\n";
    cout << "Total Population of Women           :\t" << Pop_Women << "\n";
    cout << "Literate Population of Men          :\t" << Lit_Men << "\n";
    cout << "Literate Population of Women        :\t" << Lit_Women << "\n";
    cout << "Illiterate Ppopulation of Men       :\t" << Illit_Men << "\n";
    cout << "Illiterate Population of Women      :\t" << Illit_Women;
    
    return 0;
}

Output :
DATA
_______________________________________________

Total Population of City : 80000
Total Population of Men : 41600
Total Population of Women : 38400
Literate Population of Men : 28000
Literate Population of Women : 10400
Illiterate Ppopulation of Men : 13600
Illiterate Population of Women : 28000

Leave a comment
Recent Comments
No Comments