#include<stdio.h> int main(void) { int child,women,men; for(men = 0;women<=15;men++) for(women = 0;women<=22;women++){ child=45-women-men; if(men*3 + women*0.5==45) printf("men=%d,women=%d,child=%d ",men,women,child); } return 0;
#include<stdio.h> int main(void) { int child,women,men; for(men = 0;women<=15;men++) for(women = 0;women<=22;women++){ child=45-women-men; if(men*3 + women*0.5==45) printf("men=%d,women=%d,child=%d ",men,women,child); } return 0;