+ 3
Why it's not running??
2 Respostas
+ 5
All overloads of std::pow() return a floating-type value, not an integral one. Therefore, you need to explicitly cast the result to an integral value where one is expected, i.e. in line 19 and 26. You can do it C-style or C++-style:
( int ) pow( 10, z - 1 )
or
static_cast< int >( pow( 10, z - 1 ) )
Also, in line 19 you are using 'n' where I think you meant to operate on 'y' instead.
+ 2
Return 0 is not necessary and i didn't use it in all of my programs and they are running well