answersLogoWhite

0

#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

12y ago

What else can I help you with?

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 coprime of 100?

A coprime (or relatively prime) number with respect to 100 is any number that shares no common factors with 100 other than 1. For example, numbers like 3, 7, and 99 are coprime to 100 because they do not divide evenly into 100. In general, any number that is not a multiple of 2 or 5 (the prime factors of 100) would be coprime to it.


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.


HCF of two coprime number is?

The product of the two numbers


Are 6 and 8 are coprime number?

No. They are both multiples of 2.


Is the 5 and 12 are coprime numbers?

No 5 is a prime number and 12 is composite number


What is coprime number of 42 and 39?

Coprime numbers are two numbers that have no common positive integer factors other than 1. The numbers 42 and 39 are not coprime because they share a common factor of 3. Therefore, since they have a greatest common divisor (GCD) greater than 1, they are not coprime.