Search found 2 matches

by mliu_buet
Sat May 14, 2011 7:21 pm
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 25066

Re: 10719 - Quotient Polynomial

I think you are tired of the input format:(strtok,sscanf,...bla bla)
lets check this out,

//declarations
while(scanf("%d",&k)!=EOF)
{
for(i=0;;i++)
{
scanf("%d",&poly);
if(getchar()=='\n') break;
}

// rest of the code

}


by mliu_buet
Sat May 14, 2011 7:14 pm
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 25066

Re: 10719 - Quotient Polynomial

@amishera,
You used,

printf("q(x): ");
for (i = 0;i < degree-1;i++)
{
printf("%ld ", q );
}

it should have been,

printf("q(x):");
for (i = 0;i < degree-1;i++)
{
printf(" %ld", q );
}


Thanks

Go to advanced search