代码如下
我的这个你自己要修给一下的阿
你看不懂就说
要想适合你的题目,你可以自己做修改阿
#include<stdio.h>
main()
{
int i=0;
float a[10]={0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0}; /*a=x^4+x^3+x^2+x^1+1*/
float b[10]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0}; /*b=x^2+x^1+1*/
static float c[10]; /*c store the temp */
int aflag,bflag; /*aflag is the !0 of a ,bflag is the !0 of b*/
float bei; /*beishu of a/b,and jie is the jie of a/b */
int jie;
i=0;
while(a[i]==0)
{
i++;
}
aflag=i;
i=0;
while(b[i]==0)
{
i++;
}
bflag=i;
while(aflag<=bflag)
{
bei=a[aflag]/b[bflag];
jie=-(aflag-bflag);