新手求教
"百钱百鸡"问题,公的5块,母的3块,小鸡3个1块.100块100只.#include "Stdio.h"
#include "Conio.h"
int main(void)
{int cocks=0,hens,chicks;
while(cocks<=19);
{hens=0;
while (hens<=33);
{chicks=100.0-cocks-hens;
if (5.0*cocks+3.0*hens+chicks/3.0=100.0);
printf("%d %d %d\n.",cocks,hens,chicks);
hens ++;
}
cocks++;
}
getch();
return 0;
}
报错:(红色那行)需要逻辑0或非0在main函数中.
不解.求教啦.
就此谢过.