The if statement is wrong. It should be:

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

Also, your code breaks when pow = 0. Anyway, it's an easy thing to fix.

Comatose commented: Good Catch +8

C language was developed by Dennis Ritchie, but I'm not sure if he's officially recognized as the 'Father of C language'. That said, don't post a thread as if you are at a gun-point. All those 'URGENT! URGENT! HURRY!' cries will only succeed in putting people off. Also search the web first before running to Daniweb for trivial matters.

Salem commented: Quite so. +25

After 8 posts, the community expects you to know how to use code tags. Click [url=]here[/url]

Salem commented: Well said! +25

This is your 14th post, and you still don't bother to use code tags. Also it was mentioned quite a lot of times in your [url=]previous thread[/url] that you should use [icode]int main[/icode] instead of [icode]void main[/icode].

Salem commented: Well said +23

So you really believe that the person who posted this problem is still waiting for an answer even after TWO years and wants to look at crappy looking code?

Aia commented: Fine link you posted there. ;) +11

You're wrong. getchar() does not behave in quite the way you described.

My bad. Did some research on getchar(). Seems getchar() doesn't need enter to be pressed after the input of each character. It can only [B]see[/B] the input buffer after hitting the enter. Gotta get my basics straightened. :)

Salem commented: Good work :) +22