Thread: Raising the power of an interger

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    I understand exponents, i need to have my program use a "for" loop, to solve a user inputted exponent.
    I thought you guys knew how to program?

  2. #2
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    "Indeed. And we offer our help here to assist others in learning. Therefore, you are more likely to get hints that will enable you to solve the problem yourself, than a spoon-fed answer.

    Here's the sites homework policy, fyi.

    Can you write a "for()" loop? Let's start there."

    Indeed i can.

    Code:
    For(loop_counter = 0, loop_counter < 10, loop_counter++)
    {
    printf("loop %d", loop_counter);
    
    }

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by sourpatchkid View Post
    "Indeed. And we offer our help here to assist others in learning. Therefore, you are more likely to get hints that will enable you to solve the problem yourself, than a spoon-fed answer.

    Here's the sites homework policy, fyi.

    Can you write a "for()" loop? Let's start there."

    Indeed i can.

    Code:
    For(loop_counter = 0, loop_counter < 10, loop_counter++)
    {
    printf("loop %d", loop_counter);
    
    }
    Can you write one that will compile without errors?

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Raising an Integer to a power
    By aileentas in forum C Programming
    Replies: 14
    Last Post: 09-19-2012, 03:58 AM
  2. Raising to a power
    By teelnaw in forum C Programming
    Replies: 6
    Last Post: 11-07-2010, 01:35 AM
  3. Help with checking, raising to the power of 2
    By philippe in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 07:30 PM
  4. raising to a power
    By next_to_nothing in forum C++ Programming
    Replies: 5
    Last Post: 10-22-2002, 04:00 AM
  5. Raising to a power
    By Nate2430 in forum C++ Programming
    Replies: 1
    Last Post: 09-15-2001, 04:44 PM