First commit
This commit is contained in:
13
IUT/Info1/TD/Exercices/9.1_PGCD/fonction.cpp
Normal file
13
IUT/Info1/TD/Exercices/9.1_PGCD/fonction.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "fonction.h"
|
||||
|
||||
unsigned int pgcd(unsigned int a, unsigned int b) {
|
||||
unsigned int echange;
|
||||
|
||||
while (b != 0) {
|
||||
echange = b;
|
||||
b = a % b;
|
||||
a = echange;
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
Reference in New Issue
Block a user