#include <stdio.h>
int main()
{
int i,j,k,sum = 1;
for (i = 1; i < 100; i++)
{
for (j = 1; j < 100 ; j++)
{
for (k = 1 ; k <100 ; k++)
{
if (i + j + k == 100 && 5 * i + j + 0.5*k == 100)
{
printf("第%d种方法:5元%d张,1元%d张,0.5元%d张 \n",sum,i,j,k) ;
sum++ ;
}
}
}
}
printf("\n一共%d种方法\n\n",sum-1) ;
return 0;
}