You have a link to a wikipedia article that explains how Euclide Algorithm is working.
The skeleton of your code should be like this:
void setup() {
println(pgcd(21, 15));
}
int pgcd(int a, int b) {
// TO DO
}
You need o replace “TO DO” with some code as explained in the wikipedia article.