When you try to input this stuff into a C compiler, the last answer printf("\nTotal of illiterate men is %d and women is %d. ", illiterateMen, illiterateWomen); doesn't really define the true answer instead, it put some random numbers. I tried to use the unsigned long int and also the float and doubles, but still, it is just random numbers.
unsigned int men, women, literatePeople, literateMen, literateWomen, illiterateMen, illiterateWomen, illiteratePeople;
men = 80000 * 0.52;
women = 80000 - men;
literateMen = 80000 * 0.35;
literateWomen = literatePeople - literateMen;
literatePeople = 80000 * 0.48;
illiteratePeople = 80000 - literatePeople;
illiterateMen = men - literateMen;
illiterateWomen = women - literateWomen;
printf("Total of men in the town : %d", men);
printf("\nTotal of literate people : %d", literatePeople);
printf("\nTotal of literate men : %d", literateMen);
printf("\nTotal of women : %d", women);
printf("\nTotal of illiterate men is %d and women is %d. ", illiterateMen, illiterateWomen);
Total of illiterate men is 13600 and women is 44673.
the italized one is just a random 5 digit numbers but usually starts with 44.
I hope you can help me, it will make a lot of change for my activity at school. Thank you!