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 <cstdio>
#include <cctype>
#include <utility>
#include <cmath>
using namespace std;

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _T template <typename T>
#define _HT template <typename H, typename... T>
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_T T in(int c){T n=0;bool m=false;
	while (isspace(c)) {c = gcu();}
	if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
_in() {return in<int>(gcu());}
_T T scan(T &n){int c=gcu();return c==EOF?false:(n=in<T>(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
#ifdef _GLIBCXX_STRING
_sc(string &s){int c;s="";
	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#endif
_HT _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
_vo(bool b) {pcu('0'+b);}
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
#ifdef _GLIBCXX_STRING
_vo(string s){for(char c:s)pcu(c);}
#endif
_T _vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vl(){out('\n');}
#ifdef _GLIBCXX_VECTOR
_T _vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);outl();}
#endif
_HT _vo(H&& h, T&&... t){out(h);out(move(t)...);}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

int main() {
	for (double q, x; q = in(), q != -1;) {
		for (x = q / 2; abs(x * x * x - q) >= 0.00001 * q; x = x - (x * x * x - q) / (3 * x * x))
			;
		printf("%f\n", x);
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <bitset>
#include <complex>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl;
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef complex<double> CD;

int main() {
	while (true) {
		double q; cin >> q;
		if (q == -1)break;

		double x = q / 2.;
		while (true) {
			x = x - (pow(x, 3) - q) / (3 * pow(x, 2));
			if (abs(pow(x, 3) - q) < 0.00001*q)break;
		}
		printf("%.20f\n", x);
	}

}

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

int main(){
	double n;
	while(cin >> n , n != -1){
		printf("%.6lf\n",pow(n, 1.0 / 3.0) );
	}
}

C++: #include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<cstdio>
typedef unsigned long long ull;
#define rep(i,a) for(int i=0;i<a;i++)
#define loop(i,a,b) for(int i=a;i<b;i++)
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1);
const double inf = (int)1e5;

int main(void){
  double N;
  while(cin>>N,N!=-1){
    double q =1.0*N/2;
    int i = 0;
    while(abs(pow(q,3)-N)>eps){
      i++;
      //printf("%.10f\n",q);
      q=q-(pow(q,3)-N)/(3*pow(q,2));
    }
    printf("%.6f\n",q);
  }
}

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

int main(){
  double q,x,d;
  while(cin>>q&&q!=-1){
    d=0.00001*q;
    x=q/2;
    while(1){
      x=x-(x*x*x-q)/(3*x*x);
      if(fabs(x*x*x-q)<d) break;
    }
    cout<<fixed<<setprecision(6)<<x<<endl;
  }
  return 0;
}

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

using namespace std;

long double thrt(long double q){
  long double x=q/2.0;
  while(abs(x*x*x-q)>=0.00001*q){
    x-=(x*x*x-q)/(3.0*x*x);
  }
  return x;
}

int main(){
  long double q;
  while(cin>>q&&(q!=-1)){
    cout<<setprecision(7)<<thrt(q)<<endl;
  }

}

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
	int a;
	while(true){
		cin>>a;
		if(a==-1) {break;}
		double x1=a/2,x2;
		int i=1;
		while(true){
			if(i%2==1){
				x2=x1-(x1*x1*x1-a)/(3*x1*x1);
				if(abs(x2*x2*x2-a)<0.00001*a) 
				{
					cout<<x2<<endl;
					break;
				}
			}
			else{
				x1=x2-(x2*x2*x2-a)/(3*x2*x2);
				if(abs(x1*x1*x1-a)<0.00001*a) 
				{
					cout<<x1<<endl;
					break;
				}
			}
			i++;
		}

	}
			return 0;
}

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

using namespace std;

int main(void)
{
	double q;
	while(1){
		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;
		}
		cout<<x<<endl;
	}
	return 0;
}

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

using namespace std;

void solve()
{
	int q;
	while(cin >> q, q != -1)
	{
		double eps = 0.00001 * q;
		double x = q / 2.0;
		while(fabs(x * x * x - q) > eps)
		{
			x = x - (x * x * x - q) / (3 * x * x);
		}
		printf("%.6f\n", x);
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

int main(){
    double tmp[20][2];
    int cnt=0;
    int n;
    for (;;) {
        scanf("%d",&n);
        if (n==-1) break;
        double ans=1.0*n/2.0;
        while (abs(ans*ans*ans-n)>=0.00001*ans) ans-=(ans*ans*ans-n)/(3*ans*ans);
        printf("%.8lf\n",ans);
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-8;
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
int main(){
	double q;
	while(cin>>q,q!=-1){
		double b=q/2;
		while(abs(pow(b,3)-q)>=0.00001*q){
			b=b-(pow(b,3)-q)/(3*pow(b,2));
		}
		printf("%.6lf\n",b);
	}
		
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
double q;
main()
{
	while(cin>>q,q>0)
	{
		double x=q/2;
		while(abs(x*x*x-q)>=1e-5*q)x=x-(x*x*x-q)/3/x/x;
		cout<<fixed<<setprecision(16)<<x<<endl;
	}
}