Tag Archives: common

Pascal: Greatest common divider

I often used this function – a simple and clear to understand algorithm to find the greatest common divider of two numbers. Here is the whole code for that:

I bet there’s no better way to do this on Pascal.