the problem will be counted as solved only
yet,
the problem with ur progrm is that it outputs an extra space
if(a>1){printf("x ");}
when u print the last number u put an extra space
and thats all the mistake that u have done and nothing more
Moderator: Board moderators
if(a>1){printf("x ");}
49
6477
88else
{
for(i=0;p%prima[i]!=0&&(double)prima[i]<=sqrt((double)p);i++);
if(p%prima[i]==0)
{ printf("%ld",prima[i]);
p/=prima[i];
}
if((double)prima[i]>sqrt((double)p))
{
printf("%ld\n",p);
continue;
}
}for(i=0;p%prima[i]!=0&&(double)prima[i]<=sqrt((double)p);i++);
Users browsing this forum: No registered users and 0 guests