C program for a power function

Reply

Join Date: Nov 2008
Posts: 457
Reputation: Grn Xtrm is on a distinguished road 
Solved Threads: 37
Grn Xtrm's Avatar
Grn Xtrm Grn Xtrm is offline Offline
Posting Pro in Training
 
0
  #11
32 Days Ago
Try changing int x to double x and change line 9 to:
  1. double s = x * num;
When you declare power as double, that means the return value must be also be double.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
Reply With Quote Quick reply to this message  
Reply

Tags
power

Message:


Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC