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 <iostream>
#include <cmath>
using namespace std;

int main()
{
  int q;
  while (cin >> q, q != -1){
    double x = q / 2.0;
    while (fabs(pow(x, 3) - q) >= 0.00001 * q){
      x = x - (pow(x, 3) - q) / (3 * x * x);
    }
    cout << x << endl;
  }
  return (0);
}

C++: #include <stdio.h>
#include <math.h>
int main(void){


    int q;
      while(scanf("%d", &q)!= EOF) {
      double x;     
          
    x=q/2;
    
    
   
    if(q>0)  {
     double xx;
     
    while((fabs(x*x*x-q))>(0.00001*q)){
       
        xx=x-((x*x*x-q)/(3*x*x));
        
        x=xx;
    }
    printf("%.6f\n",xx);
      }
      }
      
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
int main(void){
    long long q, x[60], x1;
    while(cin >> q){
        if(q == -1) break;
        x[1] = q/2;
        for(int i = 2; ; i++){
            x[i] = x[i-1]-(x[i-1]*x[i-1]*x[i-1]-q)/(3*x[i-1]*x[i-1]);
            if(abs(x[i]*x[i]*x[i]-q) < 0.00001*q){
                x1 = x[i]; 
                break;
            }
        }
        cout <<fixed;
        cout << setprecision(7) << x1 << endl;
        return 0;
    }
}

C++: #include <cstdio>
#include <cstdlib>
int main(){
	double r;
	while(scanf("%lf",&r) && r!=-1.0){
		double a=0.0;
		double b=r;
		while(1){
			double mid;
			mid=(a+b)/2;
			if(abs(mid*mid*mid-r)<0.00001*r){
				printf("%f\n",mid);
				break;
			}else if(mid*mid*mid>r){
				b=mid;
			}else{
				a=mid;
			}
		}
	}
}

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<map>
#include<functional>
#include<stack>
#include<list>
#include<set>
#include<deque>
#include<climits>
using namespace std;

double abso(double n){
	if(n<0) return n*=-1;
	return n;
}

int main(){
	int q;
	double x;
	while(cin>>q,q!=-1){
		x = (double)q/2.0;
		while(abso(x*x*x-q)>=0.00001*q){
			x = x-((x*x*x-q)/(3*x*x));
		}
		printf("%.6lf\n",x);
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main(void)
{
    int a;
    while(cin>>a)
     {
        if(a==-1)break;
        double q = (double)a;
        double x = q/2;
        while(abs(x*x*x-q)>=0.00001*q)
         {    
            double y = x-(x*x*x-q)/(3*x*x);
            x = y;
        }
        cout<<set.precision(6)<<fixed;
        cout<<x<endl;
    }
    return 0;
}

C++: #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	ld a = 0;
	while (true) {
		cin >> a;
		if (a == -1) { break; }
		ld x = a / (ld)2;
		while (abs(x * x * x - a) >= 0.00001*a) {
			x = x - (x * x * x - a) / (3 * x * x);
		}
		cout << x << endl;
	}

	return 0;
}

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

int main()
{
	int n;
	while(cin >> n,n != -1)
	{
		double q = n/2.0;
		double end = sqrt(0.00001*n);

		while(fabs(sqrt((q*q*q) - n)) >= end)
		{
			q = q - ((q*q*q - n) / (3*q*q));
		}

		cout << fixed;
		cout.precision(6);
		cout << q << endl;
			
	}
	return 0;
}

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

#define rep(i, n) for(int i = 0; i < n; i ++)
#define COUNT(i, n) for(int i = 1; i <= n; i ++)
#define ITER(c) __typeof((c).begin())
#define each(c, it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define ALL(c) c.begin(), c.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;
const double EPS = 1e-5;

int main(void){
    double x;
    for(int q; cin >> q, x = q / 2., ~q; printf("%.6f\n", x)) 
        while(!(fabs(pow(x, 3) - q) < EPS * q))
            x = x - (pow(x, 3) - q) / (3 * pow(x, 2));
 
    return 0;
}

C++: #include <bits/stdc++.h>
  
using namespace std;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
  
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
  
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

#define INF 1000000000

typedef double Real;
#define EPS 1e-11
#define EQ(x) (-EPS<x && x<EPS)
typedef complex<Real> P;
Real dot(P a,P b){return real(conj(a)*b);}
Real cross(P a,P b){return imag(conj(a)*b);}

int main(){
  cout.precision(12);
  while(true){
    Real x;
    cin>>x;
    if(x==-1)break;
    Real a = x/2;
    while(abs(a*a*a-x)>1e-4){
      a = a-(a*a*a-x)/(3*a*a);
    }
    cout<<fixed<<a<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
  
using namespace std;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
  
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
  
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

#define INF 1000000000

typedef double Real;
#define EPS 1e-11
#define EQ(x) (-EPS<x && x<EPS)
typedef complex<Real> P;
Real dot(P a,P b){return real(conj(a)*b);}
Real cross(P a,P b){return imag(conj(a)*b);}

int main(){
  cout.precision(12);
  while(true){
    Real x;
    cin>>x;
    if(x==-1)break;
    Real a = x/2.0;
    while(abs(a*a*a-x)>1e-4){
      a = a-(a*a*a-x)/(3.0*a*a);
    }
    cout<<fixed<<a<<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long ll;

double eps, alterX;
ll q;

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

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