Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Exercise 11 - Euclidean Algorithm for finding the GCF

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,357
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 30, 2009

I show how to write a program to find the Greatest Common Factor using the Euclidean Algorithm. If you haven't watched my math video on the Euclidean Algorithm yet I highly recommend watching it.

Math Euclidean Algorithm for the GCF
http://www.youtube.com/watch?v=YRojnL00o8c

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (hendrix5045)

  • you write an awful code just improve it 

  • @olawraia , I'll get right on that as soon as you learn some grammar.

  • @hendrix5045 I wouldn't call it awful, everyone has their ways of doing something. I think he's just trying to say the same results could have been achieved with less coding.

  • @Yondaimeku , Instead of being condescending why don't you just explain how it could be better.

  • @Yondaimeku simply because u unnecessarily called those strange variables divisor dividend, when you could simply do ur code in few lines like

    while(b>0){ c=a%b; a=b; b=c; } cout<< a;

  • @arHHco , strange variables? Naming variables what they actually are is programming etiquette 101. I would argue that using random letters as variables would make it much more complicated and harder to understand. That's the point of giving variables names you can relate to. However, this code was written a long time ago and I could make it more efficient, but that would not entail changing the variable names.

see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • Thanks man!

    

  • uiy]

  • thanks man :D

  • @xiAresx , No it wont. You could send me the math problem you have though and I could do it :)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more