write a program to find hcf of three positive intigers
Answers
Answered by
2
Answer:
#include <stdio.h>
int gcd(int x, int y)
{
while (x %= y)
{
int t = x;
x = y;
y = t;
}
return y;
}
int main()
{
int x = 100, y = 60, z = 12;
int ans = gcd(gcd(x, y), z);
printf("%d",ans);
return 0;
}
Answered by
2
Answer:
Hope it will help you something, have a great day✨
Attachments:
Similar questions