Convert radicals to mixed & entire radicals and to real numbers
C (314)

n,d;main(i){scanf("%d %d",&amp;n,&amp;d);int val[d];for(;pow(i,n)&lt;=d;i++)val[i]=pow(i,n);printf("Entire radical: %drt(%d)\n",n,d);for(i--;i&gt;0;i--)if(d%val[i]==0){printf("Mixed radical: %d*%drt(%d)\n",i,n,d/val[i]);break;}double v,x=1.5,a=d;do{v=(a/pow(x,n-1)-x)/n;x+=v;}while(abs(v)&gt;=1E-9);printf("Real number: %lf\n",x);}


Here it is with whitespace.

n,d;
main(i){
    scanf("%d %d",&amp;n,&amp;d);
    int val[d];

    for(;pow(i,n)&lt;=d;i++)
        val[i]=pow(i,n);

    printf("Entire Radical: %d*rt(%d)\n",n,d);

    for (i--;i&gt;0;i--)
        if (d%val[i]==0){
            printf("Mixed Radical: %d*%drt(%d)\n", i, n, d/val[i]);
            break;}

    double v,x=1.5,a=d;
    do{
        v=(a/pow(x,n-1)-x)/n;
        x+=v;
    }while(abs(v)&gt;=1E-9);

    printf("Real number: %lf\n", x);
} 


Input: 

2 125


Output:

Entire radical: 2rt(125)
Mixed radical: 5*2rt(5)
Real number: 11.180340


Input: 

3 125


Output:

Entire radical: 3rt(125)
Mixed radical: 5*3rt(1)
Real number: 5.000000


This isn't perfect, the root calculation will not work for all input values, and the chosen guess value is not random. It takes the whole value of the radical as input (see above).