Thread: hey real amateur needs help with trigonometry function

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    3

    hey real amateur needs help with trigonometry function

    hi,

    I have a litlle problem here. Im studying at uni and there is a subject called programming with c/c++. As i have this subject once every two weeks I get to do one laboratory work each time.

    So few minutes ago doing usual stuff by the computer I looked up the sedchule of my lessons and I saw that i have to make a programm for tommorow ( well like 4 hours left till I go to uni... )

    Programming for me is really a new thing and I dont understand almost nothing in it ( i just know very basics of it ).

    So I am asking anyone who would like to help me to write as simple as possible code for this function using C...

    tg(x)+-tg(y)=(sin(x+-y))/(cos(x)*cos(y))

    x and y must be typed by the user and the answer should come in degrees

    please guys if you are master in this it should be easy for you i think

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    I guess you missed the Homework policy, huh? No one's going to do your homework for you (well, maybe Adak will) because you forgot about your assignment.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    3
    i know thats its not right to ask people to do my homework but i just thought maybe someone will save me because its 3 am here and after 4 hours i must be at uni :/

    i am totally new to this and i thot i have whole week, was thinking to start preparing this job tommorow and would have had whole week but now... but if no one can help i will understand that, in fact thats my problem and why should anyone else care if they have theyr own problems

  4. #4
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    Quote Originally Posted by altec View Post
    i know thats its not right to ask people to do my homework but i just thought maybe someone will save me because its 3 am here and after 4 hours i must be at uni :/
    I can't think of anyone here who is that nice
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    3
    well what ever i just thought there might be someone... as this is not extremly hard for good programmers in my opinion. Dont bother going to sleep have to get atleast few hours of sleep. thanks for looking anyway

  6. #6
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    Quote Originally Posted by altec View Post
    well what ever i just thought there might be someone... as this is not extremly hard for good programmers in my opinion. Dont bother going to sleep have to get atleast few hours of sleep. thanks for looking anyway
    oh yes, it's very simple, which is one of many reasons no one here will do it for you
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  7. #7
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by altec View Post
    So I am asking anyone who would like to help me to write as simple as possible code for this function using C...

    tg(x)+-tg(y)=(sin(x+-y))/(cos(x)*cos(y))
    That's not a function.
    A function would be denoted much like this:
    tg(x, y) = ...

    You have to make a start, then post what you have, and hope someone is kind enough to give you some useful hints.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  8. #8
    Registered User
    Join Date
    Sep 2010
    Posts
    33
    I’m happy to show you how to do this if it’s not too late.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by altec View Post
    i know thats its not right to ask people to do my homework but i just thought maybe someone will save me because its 3 am here and after 4 hours i must be at uni :/

    i am totally new to this and i thot i have whole week, was thinking to start preparing this job tommorow and would have had whole week but now... but if no one can help i will understand that, in fact thats my problem and why should anyone else care if they have theyr own problems
    So even though you really don't know anything about programming, you should pass? Come on now.
    It's a shame that you thought you had more time. It stinks, and it's annoying. But that still doesn't justify you passing something without actually knowing what you're doing.
    Life is hard. You didn't learn what you were supposed to do, and we cannot help you with that. We're not going to help you cheat.
    If you still want to learn despite failing your assignment/test/whatever, then we'll help you. But we're not doing your homework.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    C lover
    Join Date
    Oct 2007
    Location
    Virginia
    Posts
    266
    You'd be surprised how many people have more than enough time to complete an assignment and fail to do so. In a few classes, I have had people begging me to do homework that isn't even hard. One guy paid me 20 bucks each time I did one of his assignments.

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > One guy paid me 20 bucks each time I did one of his assignments.
    Yes, and one day, they will be your boss (earning more of course).

    They´ve obviously mastered enough social engineering skills to talk others into doing what they´re incapable of doing for themselves.

    If you know "how", you´ll have a job.
    If you know "why", then you´ll be the boss!
    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.

  12. #12
    C lover
    Join Date
    Oct 2007
    Location
    Virginia
    Posts
    266
    I wouldn't exactly call this social engineering. He simply asked and offered and I accepted. The work wasn't even difficult or lengthy at all, and I could have used the money. It's not as if he manipulated me. Thank you very much. I would say that he didn't know "how" or "why".


    If someone doesn't know "how" then I'd suspect they wouldn't be a very competent boss to begin with.
    Last edited by Syscal; 10-04-2010 at 08:14 PM.

  13. #13
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Quote Originally Posted by Syscal View Post
    If someone doesn't know "how" then I'd suspect they wouldn't be a very competent boss to begin with.
    I deal with this almost every day.
    Woop?

  14. #14
    Registered User
    Join Date
    Jul 2010
    Location
    Oklahoma
    Posts
    107

    Off topic, a little....

    I had the privilege of meeting a person during my youth which came to mind while reading about the competencies associated with the "how" and "why" assets. This individual had a plaque hanging over a door way that read: "If you're so dang smart, why ain't you rich?"

    Altec, post some code and turn it in to the university late. That way you can get some time on the compiler, and some great advice from some great scientists/engineers for the next class meeting. All the rhetoric gets old really quickly, especially since the forum policies are clearly posted on the programming board....

    Where may I ask are you attending? You posts seem to have been translated. I was considering some of the programs in Illertissen, and I even thought about St. Andrews for a little while. The University of Mississippi had an excellent Masters of Art in Mathematics program, but I'd have to get to work on Russian or French to go with the German...seems the history of mathematics has much from which to gleen.

    Best Regards,

    New Ink -- Henry
    Kept the text books....
    Went interdisciplinary after college....
    Still looking for a real job since 2005....

    During the interim, I may be reached at ELance, vWorker, FreeLancer, oDesk and WyzAnt.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recursive function
    By WatchTower in forum C Programming
    Replies: 11
    Last Post: 07-15-2009, 07:42 AM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM