Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtof ...
func Sliceconvtof() []float64 {
	strs := strings.Split(sc.Text(), " ")

	var flts []float64
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		xf := float64(x)
		flts = append(flts, xf)
	}

	return flts
}

//ThirdRoot .
func ThirdRoot(f float64) float64 {
	xn := f / 2
	var dmt float64

	for {
		dmt = math.Pow(xn, 3) - f
		if math.Abs(dmt) < 0.00001*f {
			break
		}

		xn = xn - (dmt / (3 * math.Pow(xn, 2)))
	}

	return xn
}

func main() {

	for sc.Scan() {
		i := Sliceconvtof()
		if i[0] == -1.0 {
			break
		}
		fmt.Printf("%6f\n", ThirdRoot(i[0]))
	}

}

C++: #include <stdio.h>
#include <math.h>

int main(void){
    
    double q;
    
    while(scanf("%lf", &q)!= EOF && q != -1) {
        double x, a;
        x=q/2;
        
        while(1){
            if(fabs(x*x*x-q)<0.00001*q)
            break;
            x=x-((x*x*x-q)/(3*x*x));
            x = x;
        }
            
        printf("%.6f\n",x);
            
    }
        
    return 0;
    
}

C++: #include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;

double Third_Root( double x , double q )
{
    if( fabs( x * x * x  - q ) < 0.00001 * q )
        return x;

    return Third_Root( x - ( x * x * x - q ) / ( 3 * x * x ), q );
}

int main()
{
    double x, q;

    while( cin >> q )
    {
        if( q == -1 )
            break;
        x = q / 2;
        cout << fixed << setprecision(6) << Third_Root( x, q ) << endl; 
    }
    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main() {
	double q;
	while (cin >> q, q != -1) {
		if (q == -1)return 0;
		double x = q / 2;
		while (abs(x*x*x - q) >= 0.00001*q) 
			x = x - ((x*x*x - q) / (3 * x*x));
		if (q == -1)return 0;
		cout << x << endl;
		cout << x*x*x << endl;
	}
}

C++: #include<iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
  double num, x0, x1 ;//?????°??£?¨?
  while(cin >> num)//??????????§?
  {
    if(num == 1) cout << 1 << endl;
    else if(num == 0) cout << 0 << endl;
    else if(num == -1) break;
    else{
      x0 = num ;//?????????
      while(1){
        x1 = x0 - (pow(x0,3.0)-num)/(3*pow(x0,2.0)) ;//?????\????????????
        if(abs(pow(x1,3.0)-num)< 0.00001)//???????????¶?¢????
        {
          break ;
        }
        x0 = x1 ;//???????????????????????´????¬?????¨?????????????
      }
      cout<<fixed<<setprecision(8)<< x1 <<endl;
    }
  }
  return 0 ;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main(){
	ll q;
	while(cin>>q){
		if(q==-1)break;
		const double EPS=(1e-5);
		double x=q/2;
		while(true){
			x =x-(pow(x,3)-q)/(3*pow(x,3));
			if(abs(pow(x,3)-q)<EPS*q)break;
		}
		printf("%,7f\n",x);
	}

	return 0;
}

C++: #include <cstdio>
#include <cmath>

using namespace std;

int main() {
    while(true) {
        int Q;
        scanf("%d", &Q);
        if(Q == -1) break;
        double limit = 0.00001 * Q;
        double ans = Q/2;
        while(fabs(ans*ans*ans - Q) >= limit) {
            ans = ans - (ans*ans*ans - Q) / (3*ans*ans);
        }
        printf("%f\n", ans);
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
#define EPS 1e-5

//0080
int main(){
	// x^3=qを漸化式でとく
	// X(n+1) = X(n)-( X(n)^3 - q )/( 3*(X(n)^2) )

	int q, x;
	while(cin >> q, q!=-1){
		double x = (double)q/2.0;
		while(1){
			double c = (x*x*x-q);
			double Xn = x-c/(3*x*x);
			x = Xn;
			if(fabs(c) < q*EPS){
				cout.setf(ios::fixed);
				cout.precision(6);
				cout << x << endl;
				break;
			}
		}
	
	}
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>

int main(){
	double q, x;
	while(std::cin >> q, q != -1){
		x = q/2;
		while(fabs(x*x*x-q) >= 0.00001*q){
			x = x - (x*x*x-q) / (3*x*x);
		}
		printf("%.10lf\n", x);
	}
}

C++: #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
double q;
double cal(double n){
  double ans;
  while(1){
    ans = n - n/3.0 - q/(3.0*n*n);
    cout << ans << endl;
    if(fabs(fabs(n*n*n)-fabs(q)) < 0.00001){
      return fabs(n);
    }
    n = ans;
    
  }
}

int main(){
  while(cin >> q,q != -1){
    cout << cal(q/2.0) << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int n;
	while(cin >>n){
		if(n == -1){break;}
		double x = n/2;
		for(;;){
			if(fabs(x*x*x-n)<0.00001*n){break;}
			x = x-(x*x*x-n)/(3*x*x);
		}
		cout <<x<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#define EPS 1e-9
using namespace std;

double eps, alterX;
int q;

//漸化式
double formula() {
    return(alterX - ((alterX*alterX*alterX - q) / (3.0 * (alterX*alterX))));
}
//ループ
void solve() {
    while(fabs(alterX*alterX*alterX - q) > eps) { //|x^3 - q| <= epsの時終了
        alterX = formula();
    }
}
//出力
void output(double ans) {
    printf("%.6lf\n", ans);
}

int main(void) {
    while(cin >> q, q != -1) {
        alterX = q / 2.0; //X1
        eps = q * 0.00001; //EPS
        
        solve();
        output(alterX);
    }
    return(0);
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define EPS 0.00001

void compute(int q){
  double x = 1.0*q/2;
  while(1){
    if ( fabs(x*x*x - q) < EPS ) break;
    x = x - (x*x*x - q)/(3*x*x);
  }
  printf("%.6lf\n", x);
}

main(){
  int q;
  while( cin >> q && q >= 0 ) compute(q);
}

C++: #include <iostream>
#include <cmath>
using namespace std;

double thirdroot(double x,double q) {
  if(abs(x*x*x - q) < 0.00001 * q) {
    printf("%.6lf\n",x);
  }
  else if(abs(x*x*x - q) >= 0.00001 * q) {
    thirdroot(x - ((x*x*x - q) / (3 * x*x)),q);
  }
}

int main() {
  double q;
  while(cin >> q) {
    if(q == -1) break;
    thirdroot( q / 2.0,q);
  }
}

C++: #include <cstdio>
#include <cmath>
#include <cstdlib>

int main(void){
	int q;

	while(scanf("%d", &q)){
		if(q == -1) break;
		double x = 0;
		x = q/2;
		while(abs(x*x*x - q) >= 0.00001*q){
			x = x - (x*x*x - q) / (3*x*x);
		}
		printf("%.6f\n", x);
	}


	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using namespace std;
double q;
double cal(double n){
  double ans;
  while(1){
    ans = n - n/3.0 - q/(3.0*n*n);
    //    cout << ans << endl;
    if(fabs(fabs(ans*ans*ans)-fabs(q)) < 0.000001){
      return fabs(n);
    }
    n = ans;    
  }
}

int main(){
  while(cin >> q,q != -1){
    cout  << fixed << setprecision(7) << cal(q/2.0) << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
  double x,q;
  while(  cin >> q ){
    if(q == -1.0)break;
    x = q/2;
    while(fabs(pow(x,3) - q) >= 0.00001*q )x = x - (pow(x,3) - q)/(3*pow(x,2));
    printf("%.10f\n",x);
  }
  return 0;
}