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
Related questions

Where you get c codings?

u can get it on helpucode.blogspot.in daniweb.com


C plus plus codings for bank management?

yes


What is a number that is coprime with 100?

3


What number coprime with 18?

coprime numbers with 18 are : 17 and 19.


Fill in the syllogism. If ab and bc then a?

The answer will depend on whether or not the relationship between the pairs of variables is transitive. In mathematics, not all relationships are transitive.For example, if the relationship is "is coprime with", then2 is coprime with 3, 3 is coprime with 4 but 2 is certainly not coprime with 4.


What is the LCM of ab and bc?

The least common multiple (LCM) of two numbers is the smallest number that is a multiple of both numbers. In this case, the LCM of ab and bc would be the product of the two numbers divided by their greatest common divisor (GCD), which is b. Therefore, the LCM of ab and bc is abc.


Are 6 and 8 are coprime number?

No. They are both multiples of 2.


HCF of two coprime number is?

The product of the two numbers


Is 5 and 7 coprime?

Coprime numbers are those in which only 1 and that number (say 5) can be divisible by it. Both 5 and 7 would be coprime numbers because they are numbers divisible by only themselves and 1.


What is a co-prime number?

There is no such thing as a coprime number.Two integers are said to be relatively prime (or coprime) if they have no common positive factor, other than 1. Examples:Any two different prime numbers are coprime.16 and 27 are coprime.14 and 18 are not coprime. They have the common factor 2.


Is the 5 and 12 are coprime numbers?

No 5 is a prime number and 12 is composite number


What number goes into 9 and 14?

One. The two numbers are coprime.