Create pseudocode and flowchart to find the total number of illiterate men and women from the population of town.If the percentage of men is 54 from the population,and total literacy is 80% from the population.take note that the total literate men are 30 percent of the population,then the total population is input through the keyboard.
#include<conio.h>
# include<stdio.h>
#include<stdlib.h>
// Create a C program to find the total number of illiterate men and women from the population of the town.
// if the percentage of men is 54 from the population, and total literacy is 80% from the population.
// Take note that the total literate men are 30% of the population
int main()
{
int PopSize = 100;
int TotalLiteracy = 80;
int PopMen = 54,PopWomen;
int MenLiteracy,WomenLiteracy=30;
int IM,IW;
printf("\n\tTotal Population = %d",PopSize);
printf("\n\tMen Population = %d %c",PopMen,'%');
printf("\n\tWomen Population = %d %c",(100-PopMen),'%');
printf("\n\n\tTotal Literacy = %d %c",TotalLiteracy,'%');
printf("\n\tEnter Total Population: "); scanf("%d",&PopSize);
PopSize=5000;
PopMen = (PopMen*PopSize)/100;
PopWomen = PopSize - PopMen;
TotalLiteracy = (TotalLiteracy*PopSize)/100;
printf("\n\n\tTotal Population = %d",PopSize);
printf("\n\tAbsolute Men Population = %d",PopMen);
printf("\n\tAbsolute Women Population = %d",(PopSize-PopMen));
printf("\n\n\tAbsolute Total Literacy = %d",TotalLiteracy);
WomenLiteracy = (WomenLiteracy*PopSize)/100;
MenLiteracy = TotalLiteracy - WomenLiteracy;
printf("\n\n\tAbsolute Men Literacy = %d",MenLiteracy);
printf("\n\n\tAbsolute Women Literacy = %d",WomenLiteracy);
IM = PopMen - MenLiteracy;
IW = PopWomen - WomenLiteracy;
printf("\n\n\tAbsolute Men Illiteracy = %d",IM);
printf("\n\n\tAbsolute Women Illiteracy = %d",IW);
}
Pseudocode:
- Initialize Men Population %age (=M)
- Get Women Population % (=W) = 100 – M
- Initialize Total Literacy = 80%
- Initialize Men Literacy (ML) = 30%
- Input the Total Population (TP)
- Compute Absolute Men Population (AMP) = (TP * M)/100
- Compute Absolute Women Population (AWMP) = (TP * W)/100
- Compute Absolute Men Literacy = ML = (AMP*ML)/100
- Compute Absolute Women Literacy WL =(AWMP* (100-ML))/100
- Illetrate Men = AMP – ML
- Illetrate Women = AWMP - WL
Comments
Leave a comment