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 no of the literate men and women if the population of
the town is 80000
Answer Posted / bhawna
#include<stdio.h>
#include<conio.h>
main()
{
int per_men, tot_men, tot_lit_pop, tot_lit_per, men_lit_per, tot_lit_men, tot_lit_wom, tot_wom, ilt_wom, ilt_men, tot_pop=80000;
per_men=52;
tot_men=tot_pop*per_men/100;
tot_lit_per=48;
tot_lit_pop=tot_pop*tot_lit_per/100;
men_lit_per=35;
tot_lit_men=tot_pop*men_lit_per/100;
tot_lit_wom=tot_lit_pop-tot_lit_men;
tot_wom=tot_pop-tot_men;
ilt_men=tot_men-tot_lit_men;
ilt_wom=tot_wom-tot_lit_wom;
printf("\nTotal Population = %d",tot_pop);
printf("\nTotal number of Men = %d",tot_men);
printf("\nTotal number of Literate Population = %d",tot_lit_pop);
printf("\nTotal number of Literate Men = %d",tot_lit_men);
printf("\nTotal number of Literate Women = %d",tot_lit_wom);
printf("\nTotal number of Women = %d",tot_wom);
printf("\nTotal number of Illiterate Men = %d",ilt_men);
printf("\nTotal number of Illiterate Women = %d",ilt_wom);
getch();
}
Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
What is wild pointer in c with example?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
What oops means?
Differentiate between full, complete & perfect binary trees.
How do you define a string?
Write a code to remove duplicates in a string.
How does free() know explain how much memory to release?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What are the characteristics of arrays in c?
Explain how can I avoid the abort, retry, fail messages?
What is the correct code to have following output in c using nested for loop?
What is c++ used for today?
how do you execute a c program in unix.
Write a C program in Fibonacci series.
What is memcpy() function?