#include <cstdlib>
#include <iostream>
#include <stdio.h>
long cubo(long x);
long num, rep;
main()
{
printf ("introduce un numero entero: ");
scanf("%d", & num);
rep=cubo(num);
printf("\n el cubo de %ld is %ld", num, rep);
system("PAUSE");
return EXIT_SUCCESS;
}
long cubo(long x)
{
long x_cubod;
x_cubo=x*x*x;
return x_cubod;
}
y el eror que me marca es :
In function 'long int cubo(long int)'
'x_cubo undeclared(first use this function)'
hojala me puedan ayudar por que me urge saber por que me marca este error en todos los progrma que intento hacer utilizando funciones






Mode Lineal
