for loops using square roots, square, Cube

This is a discussion on for loops using square roots, square, Cube within the C Programming forums, part of the General Programming Boards category; Im new to c language and having problems using square root, square and cube with a for loop. Where does ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    Lightbulb for loops using square roots, square, Cube

    Im new to c language and having problems using square root,
    square and cube with a for loop. Where does the calculation for the square root, square and cube go in this progam;does the
    order in which they are placed matter.

    -Loft:

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,156

    Re: for loops using square roots, square, Cube

    Based on what you've told us, no it doesn't matter.

    Base on what we have to assume because you haven't told us everything, it might but probably not.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,334
    > Where does the calculation for the square root, square and cube go in this progam
    Well there are two choices
    - inside the loop
    - outside the loop
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    Talking Thanks for the input

    Thanks for the info.I figured it out: it was very simple. I was just making it seem hard. Thanks
    -lotf

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Forced moves trouble!!
    By Zishaan in forum Game Programming
    Replies: 0
    Last Post: 03-27-2007, 06:57 PM
  2. Help with my draughts game
    By Zishaan in forum C++ Programming
    Replies: 9
    Last Post: 03-24-2007, 07:33 AM
  3. Simplifing Square Roots
    By LiNeAr in forum C++ Programming
    Replies: 11
    Last Post: 10-01-2005, 08:56 PM
  4. factorials, square roots, and infinite series
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 06-05-2002, 01:48 PM
  5. Square roots / Powers etc.
    By Robert602 in forum C++ Programming
    Replies: 4
    Last Post: 09-30-2001, 03:26 AM

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