Контрольная работа: Фундаментальная группа. Конечные поля
break;
}
int deg_tmp = deg - f;
Polynom *tmp = new Polynom(deg_tmp+1);
for(int i = f; i <= deg; i++)
tmp->coef[i-f] = coef[i];
return tmp;
}
Polynom :: Polynom(char *str)
{ deg = strlen(str)-1;
coef = new int[deg+1];
for(int i = 0; i <= deg; i++)
coef[i] = str[i] - 48;
}
Polynom :: Polynom(int d)
{ deg = d-1;
coef = new int[d];
for(int i = 0; i <= deg; i++)
coef[i] = 0;
}
Polynom :: Polynom(Polynom *p)
{ coef = p->coef;
deg = p->deg;
}
Polynom :: ~Polynom()
{ delete coef;
}
int Polynom :: operator[](int it)
{ return ( coef[it] );