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<cstdio>
#include<cmath>

using namespace std;

typedef long long LL;
typedef long double LD;

int main(){

	LL q;
	LD x;

	while(1){

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

		x=(LD)q/2.0;
		while(abs(x*x*x-q)>=0.00001*q){
			x=x-(x*x*x-q)/(3.0*x*x);
		}
		printf("%.6lf\n",x);
	}
}

C++: #include<iostream>
#include<stdio.h>
#define EPS 0.00001
using namespace std;
typedef long long ll;

bool eq(double x,double y){
  if(-EPS<x-y&&x-y<EPS)return true;
  else return false;
}

ll n;
double q;
double t[10000];
int main(){
  while(cin>>n){
    if(n==-1)break;
    t[1]=n/2.0;
    for(int i=2;i<10000;i++){
      t[i]=t[i-1]-(t[i-1]*t[i-1]*t[i-1]-(double)n)/(3.0*t[i-1]*t[i-1]);

      if(eq(t[i]*t[i]*t[i],n)){
	//cout<<t[i]<<endl;
	printf("%.6f\n",t[i]);
	break;
      }
    }
    
  }
}

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

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

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

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

C++: #include <iostream>
#include <cmath>
#include <cstdio>
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);
    }
    printf("%f\n", x);
  }
  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 < k; i++) in/=10;
  return 1+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*10*10*10*10*!0 - in*10*10*10*!0*10) < judge){
	printf("%.6Lf\n",x);
	break;
      }
      x = (2*x/3 +in/(3*x*x));
    }
  }
  return 0;
}

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

using namespace std;

int main(void){

  double q;

  while(cin >> q,q!=-1){
    double x=q/2;
    while(abs(x*x*x-q)>0.00001*q)
    x=x-(x*x*x-q)/(3*x*x);

    printf("%.6lf",x);
    cout << endl;
  }

  return 0;
}

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

int main(void) {
	double x;
	long long q;
	
	while(cin >> q) {
		if(q == -1) break;
		
		x = (double)q / 2;
		
		while(abs(x*x*x - q) > (double)q / 100000) {
			x = x - (x*x*x - q) / (3*x*x);
		}
		
		printf("%.6lf\n", x);
	}
	
	return 0;
}

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(){ll n;while(cin>>n,n+1)printf("%.9f\n",pow(n,1/3.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("%f\n", x);
  }
  
  return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main() {
	typedef long double ld;
	ld q;
	while (cin >> q) {
		if (q == -1)return 0;
		if (q == 1)cout << "1\n";
		else {
			ld x = q / 2;
			while (abs(x*x*x - q) > 0.00001*q) {
				x = x - ((x*x*x - q) / (3 * x*x));
			}
			printf("%.10f\n", x);
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;

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

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

using namespace std;

bool C(long double x, long double q) {
	return x*x*x < q;
}

int main() {
	long double q;
	while (cin >> q) {
		if (q == -1.0) {
			break;
		} else if(q == 1.0) {
			cout << 1.0 << endl;
		} else {
			long double lb = 0;
			long double ub = q/2.0;
			for (int i = 0; i < 100; i++) {
				long double mid = (lb+ub) / 2.0;
				if (C(mid, q)) lb = mid;
				else ub = mid;
				if (fabs(ub*ub*ub-q) < 0.00001*q) {
					break;
				}
			}
			printf("%.6Lf\n", ub);
		}
	}
	return 0;
}

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

using namespace std;

typedef long long LL;
typedef double double DD;

int main(){

	LL q;
	DD x;

	while(1){

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

		x=(DD)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 <bits/stdc++.h>
using namespace std;

int main(){
//    int a;
    double b,c;
    while(cin>>b&&b!=-1){
        c=b/2;
        while(fabs(c*c*c-b)>=b*1e-5){
            c=c-(c*c*c-b)/(3*c*c);
        }
        cout<<c<<endl;
    }
}

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

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

int main() {
  double q, x;
  while(cin >> q && q != -1) {
    x = q/2.0;
    while(!finish(q, x)) {
      x = x - (x*x*x - q)/(3*x*x);
    }
    printf("%.10f\n", x);
  }
  return 0;
}

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(){
	ll n;
	while(cin>>n,n+1){
		double x=n/2.0;
		while(abs(x*x*x-n)>0.0000001*n){
			x-=(x*x*x-n)/(3*x*x);
		}
		printf("%.9f\n",x);
		
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(){
  int N;

  while(cin >> N, N != -1){
    printf("%.6f\n",pow(N,0.333333333333333333));
  }

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