#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,y,z;
for(z=1;z<=50;z++)
{
for(y=1;y<=10;y++)
{
for(x=1;x<=5;x++)
{
if(10*x+5*y+z==100&&x+y+z==50)
printf("shi yuan=%d\twu yuan=%d\tyi yuan=%d\n",x,y,z);
}
}
}
return 0;
}
感谢指正