Thread: Need Help with this project

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Need Help with this project


  2. #2
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    So what's the problem?

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    I need help writing this program

    We use code blocks and I am having a hard time understanding where to start; how to write the functions for degrees to radian or radians to degrees, sin and cos. I know I need to build header files and then use them to satisfy my main file. If you can help me with the functions, I can try and do the rest.

  4. #4
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    If you can't even create a function to convert from radians to degrees, there's no way you'll be able to do that assignment. Give up hope now.

  5. #5
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Okay, maybe a little harsh for me to say that, but really...

    Code:
    #define PI 3.14159265312
    
    double todegrees(double radians)
    {
         return 180.0 * radians / PI;
    }

  6. #6
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    doing the iterations for sin and cos should be easy too...

    Code:
    int i;
    double value = 0.0;
    
    for (i=0; i<100; i++)
          value += someinlinefunctionhere((double)i);
    where someinlinefunctionhere is one of the functions given in your doc file

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 09:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM