一个简单的搜索就可以了
main()
{int i,j,k,n=0;
for(i=0;i<=10;i++) /*third for*/
{for(j=0;j<=10;j+=2) /*second for*/
{for(k=0;k<=10;k+=5) /*first for*/
{if(i+j+k==10)
{printf("%d ,%d, %d is one of the combination",i,j,k);
n++;}/*if end*/
}/* first for end*/
}/*second for end*/
}/*third for end*/
}/*main end*/