Find the greatest common divisor 10 and find the greatest common divisor

Updated on educate 2024-05-08
3 answers
  1. Anonymous users2024-02-09

    for (c=a;c>=1;c--)

    if (a%c==0&&b%c==0)

    break;

    printf ("%d",c);

    A mistake was made here.

    break will jump out of the loop and will not execute printf ("%d",c);Finish.

    Put printf ("%d",c);Change outside the loop:

    for (c=a;c>=1;c--)

    if (a%c==0&&b%c==0)

    break;

    printf ("%d",c);

  2. Anonymous users2024-02-08

    How to find the common divisor is as follows:

    1. Prime factor decomposition method

    The product of several numbers is the least common multiple of these numbers, and then all the common prime factors and unique prime factors in each number are extracted and multiplied.

    2. Short division

    To find the greatest common divisor by short division, first use the common divisor of these numbers to continuously remove until all the quotients are co-primitive, and then all the divisors are multiplied and destroyed, and the resulting product is the greatest common divisor of these numbers. The essence of short division is the prime factor factorization method, but the prime factor is decomposed by short division symbols.

    The short division sign is the division sign reversed. Short division is to write the prime factor common to two numbers where the divisor is written in division, and then drop the quotient of the two numbers divisible by the common prime factor, and then divide, and so on, until the result is coprime (the two numbers are co-primed).

    When calculating multiple numbers with short division, the factors that exist in any two of them must be calculated, and the other numbers without this factor fall as they are. Until every two remaining are mutual. Multiply the greatest common factor by one side, and multiply the least common multiple by one circle.

    Whether it's short division or factoring prime factors, it can be difficult when the prime factors are large. That's where a new approach comes in.

    3. Tossing and dividing.

    Tossing and dividing is a method of finding the greatest common divisor of two natural numbers, also known as Euclidean's algorithm.

    Greatest common divisor concept:

    If the number a is divisible by the number b, a is called a multiple of b, and b is called the divisor of a. Both divisors and multiples indicate the relationship of one integer to another integer and cannot exist on its own. For example, it can only be said that 16 is a multiple of a certain number and 2 is a divisor of a certain number, but it cannot be said in isolation that 16 is a multiple and 2 is a divisor.

    Multiples and multiples are two different concepts, multiples refer to the quotient of the division of two chakai numbers, which can be integers, decimals, or fractions. Multiples are only within the range of the number divisible, relative to the divisor of Yu Xiang's concept of a number, which represents a number that can be divisible by a certain natural number.

    A few integers, the common divisors, are called the common divisors of these numbers; The largest of these is called the greatest common divisor of these numbers. For example, the greatest common divisor is 4, 4 is the greatest common divisor between 12 and 16, and the greatest common divisor is 3.

    The common multiple of several natural numbers is called the common multiple of these numbers, and the smallest natural number is called the least common multiple of these numbers. For example, a multiple of 4 has ,...Multiples of 6 have ,...The common multiples of 4 and 6 have ,...The youngest of them is 12.

    The least common multiple of several coprime numbers is the absolute value of their product.

  3. Anonymous users2024-02-07

    The greatest common divisor is the largest of the common factors of several integers.

    An integer that is divisible by an integer is called its divisor; An integer that can be divisible by an integer per mu is called a multiple of it; If a number is both a divisor of a number a and a divisor of a number b, it is called the common divisor of a, the common divisor of b, the common divisor of a, b, the largest of which (which can include ab itself) is called the greatest common divisor of ab.

    Find the greatest common divisor

    1. Find the divisor method: find all the divisors of the two numbers of hail, and then find all the common divisors of the two numbers, the largest one is the greatest common divisor.

    2. More derogation method: any two numbers, to determine whether it is an even number, is to use 2 to reduce the simplification, not to use the larger number to subtract the smaller number, the resulting difference and the smaller number compare, and then use the large decrease, until the resulting subtraction and difference are equal, and then use the product of the number of 2 and the equal number obtained is the greatest common divisor.

    3. Tossing and turning division: divide a small number by a large number, and the result is an integer, then this number is the greatest common divisor, and the remainder is not used to divide the divisor just now, until the integer is obtained, and then the divisor is the greatest common divisor.

Related questions
12 answers2024-05-08

If the major common divisor of two numbers is 37, then the sum of two numbers 444 should be 37 and multiples, so there are 5 groups of numbers with a common divisor of 37 and a sum of 444, that is, 1*37 and 11*37 >>>More

10 answers2024-05-08

Find the common divisor like two numbers m and n

r=m%n; >>>More

11 answers2024-05-08

The common factor, also known as the common divisor. In the narrative of mathematical analysis, if n and d are integers and there is an integer c such that n = cd, then d is said to be a factor of n, or n is a multiple of d, denoted as d|n (pronounced d divisible by n). If d|a and d|b is a common factor between a and b. >>>More

8 answers2024-05-08

If it is a power amplification circuit, it is recommended that you post the circuit. >>>More

39 answers2024-05-08

You can't play what you buy Because your E6300 45nm This CPU front-side bus is only 1066 So if you don't overclock, DDR3 memory can only work at a frequency of 1066 So it's not cost-effective to do this It's better to buy E8200 loose chips It's only 700 1333 front-side bus Perfect support for your memory If you don't change the CPU, with ASUS-Gigabyte-MSI, a first-line brand, the motherboard of about 500 can be stable, because the motherboard I dare to guarantee that if it is not exceeded, you use a motherboard of 300 yuan The effect is the same as that of the 3000 motherboard. >>>More