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.
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 ...
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.
First write down the algorithm
e.g.
1. Get a and b from user
2. Find remainder of a/b
3. ...
etc
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.
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.
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...
- Using The GNU GDB Debugger: Tutorial with examples and exercises.
BEcause its basically a extra credit problem. ANd i would like to involve myself in all work.
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.
>We have to write a program that takes numbers and returns there greatest common denominator.
I assume "We" means your math or programming class.
Do you know how to find the greatest common denominator?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.
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.