First commit
This commit is contained in:
23
IUT/Info1/TD/Exercices/8.5_PGCD/main.cpp
Normal file
23
IUT/Info1/TD/Exercices/8.5_PGCD/main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "fonction.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
unsigned int plusGrandDiviseur;
|
||||
|
||||
cout << "Entrez a un entier positif" << endl;
|
||||
cin >> a;
|
||||
|
||||
cout << "Entrez b un entier positif" << endl;
|
||||
cin >> b;
|
||||
|
||||
plusGrandDiviseur = pgcd(a, b);
|
||||
|
||||
cout << "Le plus grand diviseur commun de " << a << " et " << b << " est " << plusGrandDiviseur << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user