百马百担问题:有100匹马,驮100担货,大马驮3担,中马驮2担,两匹驮1担,问大、中、各多少匹? main( ) { int hb,hm,hl,n=0 for(hb=0hb<=100hb+= (1) ) for(hm=0hm<=100-hbhm+= (2) ) { hl=100-hb- (3) if(hb/3+hm/2+2* (3) ==100) { n++ printf('hb=%d,hm=%d,hl=%d/n',hb/3,hm/2,2*hl) } } printf('n=%d/n',n) }