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<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(){

	double q;
	while( cin >> q){
		if(q==-1) break;
		double x = q / 2;
		while(1){
			x = x - (x*x*x - q)/(3*x*x);
			if(abs(x*x*x-q) < 0.00001*q) break;
		}
		printf("%.6f\n",x);
	}
	return 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(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x);
		printf("%.6f\n", x);
	} 
	return 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(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x);
        printf("%.6f\n",x);
    }
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    double a,x;
    while(cin>>a){
        if(a==-1)
            break;
        x=a/2;
        while(1){
            x=x-(x*x*x-a)/(3*x*x);
            if(fabs(x*x*x-a)<0.00001*a)
                break;
        }
        printf("%.6f\n",x);
    }
}

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

bool eq(double x, double q){
    return abs(x*x*x-q) < 0.00001*q;
}

int main(){
    double n;
    while( cin >> n, n != -1 ){
        double x = n/2;
        while( true ){
             x = x - (x*x*x-n)/(3*x*x);
             if( eq(x, n) ) break;
         }
        cout << x << endl;
    }
}

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;
 
 double abs(double x)
 {
   if(x>=0) return x;
   else return -x;       
 }
 
 int main()
 {
   long long int q;
   while(cin>>q&&(q!=-1))
   {
     double x;
     if(q<1000000000) x=(1.0*q)/2;
     else x=100000000000.0;
     while(abs(pow(x,3)-q)>=(0.00001*q))
     {
       x=x-1.0*(pow(x,3)-q)/(3*x*x);                                
     }                        
     printf("%.6lf\n",x);
   }
   //while(1);
   return 0; 
 }

C++: #include <bits/stdc++.h>
//typedef unsigned long long int ull;
using namespace std;

double temp(double,double);

double temp(double x,double q){
    x-=(x*x*x-q)/(3*x*x);
    return x;
}

int main(){
    double x,q;
    while(1){
        cin>>q;
        if(q==-1)break;
        x=q/2;
        do{
            x=temp(x,q);
        }while(abs(x*x*x-q)>=1e-5*q);
        cout<<x<<endl;
    }
}

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

void solve(long long q) {
    long double x = q / 2.0;
    while(abs(x*x*x-q) >= 0.000001*q) {
        x = 1.0 * x - (x*x*x - q) / (3 * x*x);
    }
    printf("%.15Lf\n", x);
}

int main() {
    long long q;
    while(~scanf("%lld",&q) && ~q) solve(q);
}

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 long 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-8){
      a = a-(a*a*a-x)/(3*a*a);
    }
    cout<<fixed<<a<<endl;;
  }
  return 0;
}

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

int main() {
    int q;
    while (cin >> q, q != -1) {
        double x = q / 2.0;
        double eps = 0.0001 * q;
        while (eps <= abs(x*x*x - q)) {
            x = x - (x*x*x - q) / (3*x*x);
        }
        cout.precision(6);
        cout << fixed << x << endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
int main(){
	int q;
	while(cin >> q,q!=-1){
		double ans = q/2;
		while(1){
			if(fabs(ans*ans*ans -q) < 0.00001*q)break;
			ans = ans-((ans*ans*ans-q)/(ans*ans*3));
		}
		printf("%.6lf\n",ans);
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-10;

signed main() {
	double q;
	while (cin >> q, q != -1) {
		double x = q / 2;
		while (abs(x*x*x - q) >= 1e-5*q) {
			x = x - ((x*x*x - q) / (3 * x*x));
		}
		cout << x << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <cmath>

using namespace std;

int main(){

	int q;
	while(cin>>q&&q!=-1){
		double x=(double)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;
}