Answer to Question #286652 in C for Zelch

Question #286652

Create a C program to find the total number of of illiterate men and women from the population in the town.If the percentage of men is 54 from the population, and total literacy is 80% from the population.Then the total population is input to the keyboard.

1
Expert's answer
2022-01-11T11:11:49-0500
using namespace std;
//	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);
	
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS