共有一百匹马一百担。第一种马一匹挑三担,第二种马一匹挑两担,第三种马两匹挑一担,问有多少种方法
帮忙看看哪里有问题问什么不能编译
#include <stdio.h>
int main()
{
int big, mid, small, sum = 0;
big = 0;
while (big < 33)
{
mid = 0;
while (mid < 50)
{
small = 0;
while (small < 100)
{
if (3 * big + 2 * mid + small / 2 == 100 && big + mid + small == 100)
{
printf("big:%d mid:%d small:%d\n", big, mid, small);
sum++;
}
small+=2;
}
mid++;
}
big++;
}
printf("%d\n", sum);
}