N00b to PRogramming Help

This is a discussion on N00b to PRogramming Help within the C Programming forums, part of the General Programming Boards category; I was asked by my professor to find a way to do this. I have no progamming experience. PLease HElp ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    3

    N00b to PRogramming Help

    I was asked by my professor to find a way to do this. I have no progamming experience. PLease HElp




    We have to write a program that takes numbers and returns there greatest common denominator. Using Euclids therom. All help would be aprreciated.

  2. #2
    Registered User
    Join Date
    Feb 2004
    Posts
    72
    First write down the algorithm

    e.g.

    1. Get a and b from user
    2. Find remainder of a/b
    3. ...

    etc

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    3
    Sorry i have no clue what you are talking about lol. Ive never been introduced at all to c. So an example would be appreciated. LIke it's suppose to be written.

  4. #4
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107
    Why would your professor ask something like this of you without any programming experience? Without knowing at least a little C it will be difficult to help you with anything short of writing the program for you.

  5. #5
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    That is somewhat unreasonable of your professor to expect you to write a program when you have not had any instruction on how to write a program...

  6. #6
    Registered User
    Join Date
    Mar 2004
    Posts
    3
    BEcause its basically a extra credit problem. ANd i would like to involve myself in all work.

  7. #7
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    1) Read the tutorials on the site and on the web. They will help you learn the syntax.
    2) Learn to write like a normal person.
    3) Look at some algorithm design tutorials.
    4) Combine the above.

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >We have to write a program that takes numbers and returns there greatest common denominator.

    I assume "We" means your math or programming class.

  9. #9
    Registered User
    Join Date
    Feb 2004
    Posts
    72
    Originally posted by astro1883
    Sorry i have no clue what you are talking about lol. Ive never been introduced at all to c. So an example would be appreciated. LIke it's suppose to be written.
    Do you know how to find the greatest common denominator?
    If you don't then it doesn't matter how much C you know, you'll never get the solution.

    Writing the algorithm has nothing to do with C. It's the same set of steps as if you were calculating it on paper.

    Once you have that then you translate it into C, which will be an easier task.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. n00b questions
    By C+noob in forum C++ Programming
    Replies: 43
    Last Post: 07-09-2005, 03:38 PM
  2. n00b problems
    By piebob in forum C++ Programming
    Replies: 2
    Last Post: 06-17-2005, 01:51 AM
  3. n00b Code Error.
    By Zeusbwr in forum C++ Programming
    Replies: 4
    Last Post: 10-11-2004, 05:15 PM
  4. n00b doing a Socket operation on non-socket
    By Kinasz in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-25-2004, 02:29 AM
  5. ISO someone daring to look at some n00b code!
    By Rev. Jack Ed in forum Game Programming
    Replies: 4
    Last Post: 10-17-2003, 08:45 AM

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