//inversion of a polynomial fraction #include #include "polynoms.h" #include "polfract.h" ar_fraction F; bool InvPolFract(ar_fraction *F) { ar_polynom P; if (F->denom.degree==0 && F->denom.coeff[0].value==0) return FALSE; P=F->denom; F->denom=F->numer; F->numer=P; return TRUE; } void main() { printf("\n INVERSION OF A POLYNOMIAL FRACTION:\n\n"); EnterPolFract(" Enter polynomial fraction P(x)/Q(x):", &F); printf("\n"); InvPolFract(&F); //display 1/F DisplayPolFract(&F); printf("\n\n"); } //end of file invfract.cpp