answersLogoWhite

0


Best Answer

#include<stdio.h>

int main(){

int n1,n2;

printf("\nEnter two numbers:");

scanf("%d %d",&n1,&n2);

while(n1!=n2){

if(n1>=n2)

n1=n1-n2;

else

n2=n2-n1;

}

printf("\nGCD=%d",n1);

return 0;

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Codings for coprime number in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp