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 <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int q;
  while (cin >> q, q != -1) {
    double x = q / 2.;
    while (!(abs(x * x * x - q) - 0.00001 * q < -1e-10)) {
      x = x - (x * x * x - q) / (3. * x * x);
    }
    cout << x << endl;
  }

  return 0;
}

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


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

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

int main() {
   double q,x;
   while(cin >> q) {
	   if (q==-1) break;
	   x=1;
	   while (true) {
		   x-=(x*x*x-q)/(3*x*x);
		   if ((x*x*x-q)<0.000001*q && (x*x*x-q)>-0.000001*q) break;
	   }
   printf("%lf\n",x);
   }
  return 0;
}

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

#define abs(x) ( x>0.000000 ? x : -x )

double third_root( double x, double q) {
	double x2 = (2.0*x + q/(x*x))/3.0;
	if( abs( x2*x2*x2 - q )<0.000010*q ) return x2;
	return third_root( x2, q);
}

int main() {
	int n;
	while(1) {
		std::cin >> n;
		if(n==-1) break;
		std::printf("%.6f\n", third_root( (double)n / 2.0, (double)n ) );
	}
	return 0;
}

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

const long long INF = (1 << 31) - 1;

int main ()
{
    double q;
    while (cin >> q, q < 0) {
        double ub = INF, lb = -1;
        for (int i = 0; i < 1000; i++) {
            double mid  = (ub + lb) / 2.0;
            if (mid * mid * mid > q) {
                ub = mid;
            } else {
                lb = mid;
            }
        }
        printf("%.6f\n", ub);
    }

    return 0;
}

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

using namespace std;

long double make(long double in){
  int i = (int)in;
  int k = 0;
  while(i){
    k++;
    i/=10;
  }
  for(int i = 0; i < 5+k; i++) in/=10;
  return 0.0001+in;
}

int main(){

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

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.000001*q){
			x = x-((x*x*x-q)/(3*x*x));
		}
		printf("%.16lf\n",x);
	}
	return 0;
}

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

int main(){
    double x, q;
    while(cin >> q, q != -1.0){
        x = q / 2.0;
        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 <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.0*xn*xn);
    return third_root(xn, q);
    
}


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

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

#define EPS 1e-5

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

C++: #include<iostream>
#include<cmath>
using namespace std;
int main() {
	double q;
	while (cin >> q) {
		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;
		printf("%.10f\n", x);
	}
}

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;
		cout<<x<<endl;
	}
}

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  << setprecision(8) << x << endl;
	}
	return 0;
}

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

using namespace std;

int main(){
	int q;
	cin >> q;
	while(q > 0){
		double x = (double)q/2;
		while(abs(pow(x,3)-q) >= 0.00001*q){
			x = x-(pow(x,3)-q)/3/pow(x,2);
		}
		printf("%.6f\n",x);
		cin >> q;
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	while(cin>>n,n+1){
		double x=n/2.0;
		while(abs(x*x*x-n)>0.0000001*n){
			x=x-(x*x*x-n)/(3*x*x);
		}
		printf("%.9f\n",x);
		
	}
}

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

using namespace std;

int main(void){

  int q;
  while( cin >> q ){
    if( q == -1 )break;
    if( q == 1 ){
      printf("1.000000");
      cout << endl;
      continue;
    }
    double x =  q / 2;
    while(1){
      if( abs(x*x*x - q) < 0.00001*q )break;
      x = x - ( x*x*x - q ) / ( 3*x*x );
    }
    printf("%.6f", x);
    cout << endl;
  }
  return 0;
}

C++: #import<cstdio>
#import<cmath>
main(){int q;float x;for(;scanf("%d",&q),~q;printf("%f\n",x))for(x=q/2.;fabs(x*x*x-q)>1e-5*q;x-=(x*x*x-q)/(3*x*x));}