From 55fc7eb3bba83f4084b2f897c61d0280a5f9c097 Mon Sep 17 00:00:00 2001 From: angeld55 Date: Sat, 2 Oct 2021 17:44:35 +0300 Subject: new --- Sem. 03/GCD_solution3_Eucid.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 Sem. 03/GCD_solution3_Eucid.cpp (limited to 'Sem. 03/GCD_solution3_Eucid.cpp') diff --git a/Sem. 03/GCD_solution3_Eucid.cpp b/Sem. 03/GCD_solution3_Eucid.cpp deleted file mode 100644 index f190a90..0000000 --- a/Sem. 03/GCD_solution3_Eucid.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include - -using namespace std; - -int main() -{ - int n, k; - - cin >> n >> k; - - if (n < k) //swap - { - int temp = n; - n = k; - k = temp; - } - - while (k != 0) - { - int div = n % k; - n = k; - k = div; - } - cout << n << endl; -} \ No newline at end of file -- cgit v1.3.1-23-gd82d