Professional Documents
Culture Documents
HW 2
HW 2
HW 2
{
for (int i = p.degree; i >= 0; i--)
{
if (p.coef[i] != 0) return 0;
else if (i == 0 ) return 1;
}
}
else if (i == j)
return 0;
else
return 1;
}
p.degree--;
return p;
}
else
printf("%dX^%d", t[i].coef, t[i].expo);
}
else
{
if (t[i].expo == 0)
printf(" + %d", t[i].coef);
else
printf(" + %dX^%d", t[i].coef, t[i].expo);
}
}