Search Results

Showing results 1 to 1 of 1
Search took 0.00 seconds.
Search: Posts Made By: devnar ; Forum: C++ and child forums
Forum: C++ Jan 18th, 2009
Replies: 1
Views: 189
Posted By devnar
The if statement is wrong. It should be:

if (pow > 1)
{
full = num * full;
return (power(num, --pow, full)); //You've already multiplied once. Don't do it again.
}

Also, your code...
Showing results 1 to 1 of 1

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC