Write a program to find out the number of illiterate men from the population of 80,000 people. From the total population,52% are men, out of which only 35% are literate.
Answer:-
public class Population {
public static void main(String[] args) {
int population = 80000;
int men,literate,illiterate;
men = 52 * population / 100;
literate = 35 * men / 100;
illiterate = men - literate ;
System.out.println("------------------------------------------------");
System.out.println("Total Men ="+men);
System.out.println("Total literate men ="+literate);
System.out.println("Total illiterate men ="+illiterate);
System.out.println("------------------------------------------------");
}
No comments:
Post a Comment