Results 1 to 7 of 7
  1. #1
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425

    this may be beginnier, but...

    not to do with emulation either, but how do i find the square root of a number using c++.



    one more thing... msdn (microsoft developers network), is it free, is it a web page, if not, how much does it cost, cuz i can really use a copy
    Last edited by mesman00; May 3rd, 2002 at 05:40.
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Glide64 Website Guy LoneRaven's Avatar
    Join Date
    Jan 2002
    Location
    USA
    Posts
    57
    Hey Mesman00 here is a sample program for find the square root of a number:


    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>

    void main( void )
    {
    double question = 49, answer;

    answer = sqrt( question );
    if( question < 0 )
    printf( "Error: sqrt returns %.2f\n, answer" );
    else
    printf( "The square root of %.2f is %.2f\n", question, answer );
    }


    Hope it helps. :thumbsup:
    Last edited by LoneRaven; May 3rd, 2002 at 07:45.
    Does anyone know how I could get a grant to build myself a new computer for high end animation and graphic design?

  3. #3
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425
    alright, i thought i was told it was sqrt(), but never new it was in the math lib, thanks.
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound

  4. #4
    Moderator Cyberman's Avatar
    Join Date
    Nov 2001
    Posts
    1,824
    Originally posted by mesman00
    alright, i thought i was told it was sqrt(), but never new it was in the math lib, thanks.
    Well try using the help
    It should tell you what library it's in.. unless you are using DevC++ then you have to do it more yourself.

    Math.h contains the function definitions for the library of mathematical functions as well as predefined things such as M_PI and M_PI2 etc.

    Cyb
    Progress (n.):
    The process through which the Internet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals.
    -------------------------------------------------------------------
    Recursive (adj):
    see Recursive

  5. #5
    Moderator
    Join Date
    Nov 2001
    Location
    Oulu, Finland
    Posts
    3,271
    For msdn try http://msdn.microsoft.com. Also you can order it on CD I think.



  6. #6
    EmuTalk Member Jsr's Avatar
    Join Date
    Nov 2001
    Location
    Sweden
    Posts
    54
    Originally posted by Slougi
    For msdn try http://msdn.microsoft.com. Also you can order it on CD I think.
    Yes, you install it as helpfiles if you have the cds.
    "There is no such thing as a free lunch"
    - Milton Friedman

  7. #7
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425
    cant say i have the msdn cd's, so no help files
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •