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 / brajesh
#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 ? | 51 Yes | 11 No |
Post New Answer View All Answers
What is the difference between Printf(..) and sprint(...) ?
What are register variables in c?
How can I determine whether a machines byte order is big-endian or little-endian?
Difference between constant pointer and pointer to a constant.
How can I read in an object file and jump to locations in it?
What is wrong in this statement? scanf(ā%dā,whatnumber);
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
Write program to remove duplicate in an array?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What does %c mean in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What are the different types of pointers used in c language?
Array is an lvalue or not?
Explain what is a stream?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???