Контрольная работа: Фундаментальная группа. Конечные поля
wsprintfA(s, "%s%d", s, coef[i]);
break;
case 1:
if( coef[i] == 1 )
wsprintfA(s, "%sq", s);
else
wsprintfA(s, "%s%d*q", s, coef[i]);
break;
default:
if( coef[i] == 1)
wsprintfA(s, "%sq^%d", s, deg-i);
else
wsprintfA(s, "%s%d*q^%d", s, coef[i], deg-i);
};
}
i++;
}
if(!f)
strcat(s, "0");
return s;
}
bool TestPrimitive(Polynom *poly, Polynom *irr)
{ Polynom *tmp = poly;
Polynom *one = new Polynom("1");
for(int i = 2; i < pow((double)5, irr->deg); i++)
{ poly = (*poly) * tmp;
poly = (*poly) % irr;
Form1->Memo1->Text = Form1->Memo1->Text + "q^" + i + " =" + ' ';
Form1->Memo1->Text = Form1->Memo1->Text + poly->print();