#include<stdio.h>
// Author- Khadiza Sultana
// 10/8/2024
// Determing GCD of two integers using loop
int main()
{
int a, b; // take two integers as input
printf("Enter the integers:");
scanf("%d %d", &a, &b);
while (b!=0)
{
int remainder = a % b; //1. Determining the remainder of a/b
a = b; //2. storing b into a
b = remainder;//3. storing remainder into b
}
printf("The GCD of the two integers is: %d", a); // 'a' holds the GCD after the loop
return 0;
}