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 <stack>
#include <iomanip>
using namespace std;

double abs(double x) {
    if (x < 0) return -x;
    return x;
}

#define EPS 1e-10
double solve(double x, double q) {
    stack<double> st;
    st.push(x);
    int count = 0;
    while (!st.empty()) {
        double _x = st.top(); st.pop();
//        cout << _x << endl;
        if (abs(_x * _x * _x - q) < q * EPS) return _x;
        st.push(_x - (_x * _x * _x - q) / (3 * _x * _x));
    }
}

int main() {
    int q;
    while (cin >> q) {
        if (q == -1) break;
        printf("%.6lf\n", solve(q / 2.0, q));
    }
    return 0;
}

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

int main(){
  double q,x;
  while(cin>>q){
    if (q==-1)break;
    x = 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 <stdio.h>

double zenka(double q)
{
    double x=q/2;
    
    while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q)
    {
        x=x-((x*x*x)-q)/(3*x*x);
    }
    
    return x;
}

int main(void)
{
    int q;
    
    while(1)
    {
        scanf("%d",&q);
        if(q==-1) break;
        else
        {
            printf("%.6f\n",zenka(q));
        }
    }
    
    return 0;
}

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

using std::cbrt;
using std::cin;
using std::cout;
using std::endl;
using std::ios_base;
using std::setiosflags;
using std::setprecision;

int main() {
	int q;
	while (cin >> q && ~q) {
		cout << setiosflags(ios_base::fixed) << setprecision(8) << cbrt((double)q) << endl;
	}
}

C++: #include<cstdio>
#include<cmath>
int 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/3-q/3./x/x);
}

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

using namespace std;
 
int main()
{
    double q;
     
    while (cin >> q, q != -1) {
        double x = q/2;
         
        while (1) {
            x -= (pow(x, 3) - q) / (3 * pow(x, 2));
            if(abs(pow(x, 3) - q) < 0.00001 * q) break;
        }
        printf("%.6f\n", x);
    }
    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() {
	cout << fixed << setprecision(8) << endl;
	double q;
	while (cin >> q, q != -1) {
		double x = q / 2;
		while (abs(x*x*x - q) >= (0.000001)*q) {
			x = x - ((x*x*x - q) / (3 * x*x));
		}
		cout << x << endl;
	}
	return 0;
}

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

int main()
{
  double x,q,n;
  for(;cin>>q,q!=-1;)
    {
      x=q/2;
      for(;abs((x*x*x)-q)>=0.000001*q;)
	{
	  x=x-(
	       ((x*x*x)-q)
	       /
	       (3*x*x)
	       );
	}
      printf("%.6f\n",x);
      //      cout<<setprecision(7)<<x<<endl;
    }
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
double x,y,q;
while(cin>>q){
if(q==-1)break;
x=q*0.5;
for(;;){
y=x*x*x-q;
if(fabs(y)<0.00001*q)break;
x-=y/(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  &&  (xn*xn*xn-q)<0.00001){
        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 <stdio.h>
#include <math.h>

int main(){
  double q, x;
  while(scanf("%lf", &q) && q != -1){
    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>
#include <cstdio>
using namespace std;

int q;

bool input() {
	cin >> q;
	if(q == -1)
		return false;
	return true;
}

double solve() {
	double x = (double)q / 2;
	while(fabs(x * x * x - q) >= 0.00001 * q) {
		x = x - (x * x * x - q) / (3 * x * x);
	}

	return x;
}

int main(void) {
	while(input())
		printf("%.8f\n", solve());
}

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

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

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

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
int main()
{
	double x,q;
	while(1)
	{
		cin >> q;
		if((int)q==-1)break;
		x=q/2;
		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<cstdio>
#include<cmath>
int main(){
	int q; 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);
}

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;
		double n;
		for(int i=0;i<100000;i++){
			n=b-(pow(b,3)-q)/(3*pow(b,2));
			b=n;
		}
		printf("%.8lf\n",n);
	}
		
}

C++: #include <iostream>
using namespace std;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
long double lfabs(long double a)
{
   if(a < 0) a *= -1;
   return a;
}

int main()
{
   int i,j,k,l;
   long double x;
   int q;
   while(1) {
      cin >> q;
      if(q == -1) break;

      x = (long double)q/2;
      while(1) {
         x = x - (x*x*x - q) / (3*x*x) ;
         /* 3*x*x だと駄目だった */
         if( lfabs(x*x*x-q) < 0.00001*q ) break;
      }
      printf("%llf\n",x);
   }
   
   return 0;
}