//Population=80000,Men=52% of population,Literate people=48% of population, Literate Men=35% of Population
//Program to display count of illiterate men and illiterate women
class Population {
public static void main(String args[])
{
long pop=80000,ilm,ilw;
ilm=(long)((0.52*pop)-(0.35*pop)); //Illiterate men
ilw=(long)((0.52*pop)-ilm); //Illiterate women
System.out.println("Population:"+pop);
System.out.println("Illiterate men:"+ilm);
System.out.println("Illiterate women:"+ilw);
}
}
//Program to display count of illiterate men and illiterate women
class Population {
public static void main(String args[])
{
long pop=80000,ilm,ilw;
ilm=(long)((0.52*pop)-(0.35*pop)); //Illiterate men
ilw=(long)((0.52*pop)-ilm); //Illiterate women
System.out.println("Population:"+pop);
System.out.println("Illiterate men:"+ilm);
System.out.println("Illiterate women:"+ilw);
}
}
No comments:
Post a Comment