Arithmetic operations

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

  • Votes
  • Date
  • Descending date
  1. Contributor
    EUh.... + and - ? :D
    --
    Google is your friend, think of it before posting!
    1. Contributor
      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!
      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.
        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
          }
      2. Arithmetic operations are the basic operations that use arithmetic operators such as:
        Addition +, Subtraction -, Multiplication *, Division /