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 <stdio.h>
#include <math.h>
#include <iomanip>

using namespace std;

double third_root(double xn, double q){
    if((xn*xn*xn-q)>-0.00001*q  &&  (xn*xn*xn-q)<0.00001*q){
        return xn;
    }
    
    xn = xn-((xn*xn*xn-q))/(3*xn*xn);
    return third_root(xn, q);
    
}


int main(void)
{
    int q;
    while(cin>>q){
        if(q==-1)break;
        cout<<setprecision(7)<<third_root((double)q/2, (double)q)<<endl;;
    }

    
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

double q;

int main(){
	while(cin>>q){
		if(q==-1)return 0;
		double x=q/2;
		while(fabs(x*x*x-q)>=q*1e-5){x-=(x*x*x-q)/3/x/x;printf("%.6f\n",x);}
		printf("%f\n",x);
	}
}

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

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

C++: #include <iostream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>

//AOJ0080
#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

double q;
	
	while( cin >> q){
		if(q==-1 || cin.eof()) 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("%.8f\n",x);
//		printf("%.8f\n",pow(q,(1.00/3.00)));
	}
	return 0;
	
}

C++: #include <bits/stdc++.h>
#define range(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define rep(i,n) range(i,0,n)
using namespace std;

int main(void){
	int q;
	while(cin >> q){
		if(q==-1) break;
		double x=1.0*q/2.0;
		while(abs(x*x*x-q)>0.000001){
			x=x-(x*x*x-q)/(3.0*x*x);
		}
		cout.precision(10);
		cout << fixed << x << endl;
	}
	return 0;
}

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

using namespace std;

typedef long long LL;
typedef long double LB;

int main(){

	LL q;
	LB x;

	while(1){

		cin>>q;
		if(q==-1) break;

		x=(LB)q/2;
		while(abs(x*x*x-q)>=0.00001*q){
			x=x-(x*x*x-q)/(3*x*x);
		}
		printf("%.6f\n",x);
	}
}

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

using namespace std;

int in;
long double judge;

int getketa(int in){
  int sum = 0;
  while(in){
    in/=10;
    sum++;
  }
  return sum;
}

void make(){
  int keta = getketa(in);
  judge = in;
  for(int i = 0; i < 5+keta; i++) judge *= 0.1;
  judge += 0.00001;
  // cout << judge << endl;
}
int main(){

  while(cin >> in){
    if(in == -1) break;
    make();
    long double x = in/2;
    while(1){
      x =2*x/3+in/x/x/3;
      if(fabs(x*x*x - in) < judge) break;
    }
    printf("%Lf\n",x);
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
double ZKS(double x,int  q){
	return (x - ((x * x * x) - q) / (3 * x * x));
}

int main(void){
	int q;

	while(cin >> q){
		if(q == -1) break;

		double x1 = q / 2;
		double x = x1;

		while(abs(x * x * x - q) > 0.00001 * q){
			x = ZKS(x,q);
		}

		printf("%.6f\n", x);
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
//#include <tuple>
#include <set>
#include <string.h>
#include <functional>

#define X first
#define Y second
#define MP make_pair
//#define MT make_tuple
#define REP(i, a, n) for(int (i) = (a); (i) < (n); ++(i))
#define FOR(i, n) REP(i, 0, n)
typedef long long ll;
using namespace std;
const int MAX = 500;

template<class T, class U>
void convert(T &t, U &u)
{
	stringstream ss;
	ss << t;
	ss >> u;
}

int main()
{
	ll q;
	while( cin >> q ){
		if( q == -1 ) break;
		double x = q / 2;
		while(  abs( x * x * x - q ) >= 0.000010 * q){
			x = x - (x * x * x - q) / ( 3 * x * x );
		}
		cout << x << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;
inline int toInt(string s){int v;istringstream i(s);i>>v;return v;}
template<class T> inline string toString(T x){ostringstream o;o<<x;return o.str();}
template<class T> void pv(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}
const int INF = 1000000000;
const double EPS = 1e-10;

double func(const double x, const double q) {
	return x - (x * x * x - q) / (3 * x * x);
}

const double epsilon = 0.00001;

int main() {
	for(int N; cin >> N, N != -1;) {
		double x = N / 2.0;
		while(abs(x * x * x - N) >= epsilon * N) {
			// debug(x);
			x = func(x, N);
		}
		printf("%.6f\n", x);
	}
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;
inline int toInt(string s){int v;istringstream i(s);i>>v;return v;}
template<class T> inline string toString(T x){ostringstream o;o<<x;return o.str();}
template<class T> void pv(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}
const int INF = 1000000000;
const double EPS = 1e-10;

double func(const double x, const double q) {
	return x - (x * x * x - q) / (3 * x * x);
}

const double epsilon = 0.00001;

int main() {
	for(int N; cin >> N, N != -1;) {
		double x = N / 2.0;
		while(abs(x * x * x - N) > epsilon * N - EPS) {
			// debug(x);
			x = func(x, N);
		}
		cout << x << endl;
	}
}

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

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

		while(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;
}