#include <iostream.h>
#define N 10
void main()
{
int one,two,three;
int num=0,q=0;
cout<<"一分\t"<<"二分\t"<<"三分\t"<<endl;
for(one=0;one<=10;one++)
for(two=0;two<=5;two++)
for(three=0;three<=2;three++)
{
num=one+two+three;
if(num==N)
{
q++;
cout<<one<<"\t"<<two<<"\t"<<three<<endl;
}
}
cout<<"共有"<<q<<"种分法"<<endl;}

这是答案? 兄弟,你数学没学好啊!!