Code:
int cube (p1_y);
{
return p1_y * p1_y * p1_y
}
int cube2 (p2_y);
{
return p2_y * p2_y * p2_y
}
int square (p1_y);
{
return p1_y * p1_y
}
int square2 (p2_y);
{
return p2_y * p2_y
}
You are declaring these functions inside the default_routine function. They should be outside any functions.