filmov
tv
C Program To Check If Two Numbers are Co-Prime or Not
Показать описание
Lets write a C program to check whether two positive numbers entered by the user are Co-Prime numbers / Relative Prime Numbers or not.
Co-Prime numbers / Relative Prime Numbers: Two numbers are said to be co-prime or relative prime numbers if they do not have a common factor other than 1.
OR
Two numbers whose Greatest Common Divisor(GCD) is 1 are known as Co-Prime or Relative Prime Numbers.
Note: User entered numbers(to check for co-prime) do not require to be prime numbers.
Prime Number: Any natural number which is greater than 1 and has only two factors i.e., 1 and the number itself is called a prime number.
Factors of a number: All the numbers which perfectly divide a given number are called as Factors of that number.
C Programming Interview / Viva Q&A List
C Programming: Beginner To Advance To Expert