creating a "to the power" equivalent in c

This is a discussion on creating a "to the power" equivalent in c within the C Programming forums, part of the General Programming Boards category; laser, how would i implement that x stuff in my code? i dont really have a grasp on how to ...

  1. #16
    Registered User
    Join Date
    Sep 2009
    Posts
    11
    laser, how would i implement that x stuff in my code? i dont really have a grasp on how to put it into action instead of the pow() stuff.

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,794
    Well... write a program to print alternating 1s and -1s. That should give you some insight into how to handle this coefficient x. Once you have that figured out, you can use it for your actual program.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Pointer equivalent to array notation
    By bekkilyn in forum C Programming
    Replies: 4
    Last Post: 12-06-2006, 07:22 PM
  3. Replies: 10
    Last Post: 08-17-2005, 11:17 PM
  4. Header File Question(s)
    By AQWst in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2004, 10:31 PM
  5. Help creating lists of pointers
    By The_Kingpin in forum C Programming
    Replies: 2
    Last Post: 12-11-2004, 07:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21