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 <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(6) << cbrt((double)q) << endl;
	}
}

C++: #include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
int main(void)
{
    int a;
    while(cin>>a)
     {
        if(a==-1)break;
        double q = (double)a;
        double x = q/2;
        while(abs(x*x*x-q)>=0.00001*q)
         {    
            double y = x-(x*x*x-q)/(3*x*x);
            x = y;
        }
      printf(%.6lf/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;
const double eps = 0.0000001;

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

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


int main(){
	int in;
	double q, x;
	while(cin>>in&&in){
		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<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);
  }

  return 0;
}

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

int main()
{
    int q;
    while(cin >> q)
    {
        if(q==-1)break;
        double qz = (double)q;
        double x=qz/2;
        double e;
        while(1)
        {
            e = x*x*x-qz;
            x= x-e/(3*x*x);
            if(fabs(e)*200000 < qz) break;
        }
        printf("%.6f\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 <stdio.h>
#include <math.h>
int main(void){


    int q;
      while(scanf("%d", &q)!= EOF) {
      double x;     
          
    x=q/2;
    
    
   
    if(q>0)  {
     double xx;
     
    while((fabs(x*x*x-q))>(0.00001*q)){
       
        xx=x-((x*x*x-q)/(3*x*x));
        
        x=xx;
    }
    printf("%.6f\n",xx);
      }
      }
      
}

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

int main()
{
    int q;
    while(cin >> q)
    {
        if(q==-1)break;
        double qz = (double)q;
        double x=1;
        double e;
        while(1)
        {
            e = x*x*x-qz;
            x= x-e/(3*x*x);
            if(fabs(e)*100000 < qz) break;
        }
        printf("%6f\n",x);
    }
    

    return 0;
}

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

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>

using namespace std;

typedef long long ll;

int main(){

	double q;
	while(~scanf("%lf",&q)){
		if(q==-1) break;
		double x=q/2;
		for(;;){
			x = x - (pow(x,3.0)-q)/(3*x*x);
			if(abs(pow(x,3.0)-q) < 0.00001) break;
		}

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

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) ;
         if( lfabs(x*x*x-q) < 0.00001*q ) break;
      }
      printf("%llf\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 );
		}
		printf("%.06f\n", x);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int q;
    while(cin >> q, ~q){
        double x = q/2.0;
        while(abs(x*x*x-q) >= 0.00001*q){
            x = x-(x*x*x-q)/(3*x*x);
        }
        printf("%.10lf\n", x);
    }
    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(fabs(x*x*x-q)<0.00001*q) break;
		}
		cout<<x<<endl;
	}
	return 0;
}