Math, asked by priyankatamang1999aj, 4 hours ago

write a program to find hcf of three positive intigers​

Answers

Answered by triasha27
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 mehramanvi01
2

Answer:

Hope it will help you something, have a great day

Attachments:
Similar questions