Thread: how do u get the square root

  1. #1
    Unregistered
    Guest

    how do u get the square root

    For example say i have a number represented as nUmBeR and i want pIe to be the the square root of that number .. How do i do that.

    pIe=squareroot of (nUmBeR)....

    how i right this equation in c

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Code:
    #include <math.h>
    
    Pie = sqrt(Number);
    PS: Do you always use such names? (pIe, nUmBeR) That's ugly IMO
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Originally posted by Magos
    PS: Do you always use such names? (pIe, nUmBeR) That's ugly IMO
    i ThInK iT's NoT uGlY aT aLl

  4. #4
    Another Damn Unregistered
    Guest
    Magos, speaking of ugly, where's your logo from?

  5. #5
    Unregistered
    Guest

    a monster

    your just a ***it who aint got no style so i wouldnt be talkin.......

  6. #6
    Unregistered
    Guest

    i meant magos.....my fault

    i meant magos....my fault

  7. #7
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >your just a ***it who aint got no style so i wouldnt be talkin.......
    If you define style as a way to improve the readability and correctness of your code as I do, then you don't either. Aside from being both hard to read and type, such a mix of upper and lower case in your identifiers would be a real pain to maintain. You would have to look very closely to be sure that the variable you want to change is the one you are changing.

    And please don't engage in personal attacks as a response to valid statements of opinion. We're all entitled to feel the way we do and if our ideas differ from yours, then so be it. This is a forum for the exchange of knowledge, not flames.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. program to calculate the square root
    By saszew in forum C Programming
    Replies: 7
    Last Post: 10-28-2008, 12:53 PM
  2. Forced moves trouble!!
    By Zishaan in forum Game Programming
    Replies: 0
    Last Post: 03-27-2007, 06:57 PM
  3. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  4. Square Root ?!?
    By Tm687 in forum C++ Programming
    Replies: 1
    Last Post: 02-29-2004, 04:38 PM
  5. Templated Binary Tree... dear god...
    By Nakeerb in forum C++ Programming
    Replies: 15
    Last Post: 01-17-2003, 02:24 AM