Need Help with this project

This is a discussion on Need Help with this project within the C Programming forums, part of the General Programming Boards category; Project 8.doc...

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

    Need Help with this project


  2. #2
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    999
    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
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    999
    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
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    999
    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
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    999
    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, 10:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02: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, 08:41 PM

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