Online C++ compiler to run C++ program online


Download 178.5 Kb.
Sana12.03.2023
Hajmi178.5 Kb.
#1264610
Bog'liq
1 masala


EKUB

// Online C++ compiler to run C++ program online
#include

using namespace std;

int main()
{
int a, b;

cout << "A = "; cin >> a;


cout << "B = "; cin >> b;

while (a != b)


{
if (a > b) a %= b;
else b %= a;

if (a == 0) a = b;


if (b == 0) b = a;
}

cout << a << endl;



return 0;
}

Download 178.5 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling