Arithmetic operations

pgcdppcm Posted messages 67 Status Member -  
pgcdppcm Posted messages 67 Status Member -
Bonjour,
les opérations arithmétiques de base sont :
1. Addition (+)
2. Soustraction (−)
3. Multiplication (×)
4. Division (÷)
5. Modulo (restant de la division)
Ces opérations sont fondamentales en mathématiques et sont utilisées pour effectuer des calculs.

5 answers

  1. neogenesis Posted messages 5303 Status Contributor 530
     
    EUh.... + and - ? :D
    --
    Google is your friend, think of it before posting!
    0
  2. neogenesis Posted messages 5303 Status Contributor 530
     
    Do you want to know the algorithm for the least common multiple (LCM) and the greatest common divisor (GCD)?
    --
    Google is your friend, think about it before posting!
    0
  3. bbsolar Posted messages 4 Status Member 1
     
    The algorithm for the GCD is as follows:

    int pgcd(int a, int b){
    while(a!=b){
    if(a>b)
    a=a-b;
    else
    b=b-a;
    }
    }

    this is the function that allows you to find the GCD between two numbers passed to this function.
    0
    1. bbsolar Posted messages 4 Status Member 1
       
      The algorithm for the GCD is as follows:

      int pgcd(int a, int b){
      while(a!=b){
      if(a>b)
      a=a-b;
      else
      b=b-a;
      }
      return a; // or return b
      }
      0
  4. pgcdppcm Posted messages 67 Status Member
     
    Thank you very much.
    0
  5. bbsolar Posted messages 4 Status Member 1
     
    Arithmetic operations are the basic operations that use arithmetic operators such as:
    Addition +, Subtraction -, Multiplication *, Division /
    -1