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


Please Help Members By Posting Answers For Below Questions

What is the difference between Printf(..) and sprint(...) ?

780


What are register variables in c?

571


How can I determine whether a machines byte order is big-endian or little-endian?

615


Difference between constant pointer and pointer to a constant.

607


How can I read in an object file and jump to locations in it?

573






What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

722


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?

599


Write program to remove duplicate in an array?

595


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

620


What does %c mean in c?

643


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.

645


What are the different types of pointers used in c language?

610


Array is an lvalue or not?

633


Explain what is a stream?

606


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1512