// Si scriva un programma che dato un numero ne restituisca // il suo cubo. #include #include int main() { float x; cout << "Inserisci un numero: x = "; cin >> x; float cubo_x = x * x * x; cout << "A mano: \t x^3 = " << cubo_x << endl; cubo_x = pow(x, 3); cout << "Con 'pow': \t x^3 = " << cubo_x << endl; float cubo_x_approx = floor(cubo_x); cout << "Parte intera di x^3 = " << cubo_x_approx << endl; return 0; }