arithmetic-expressions

What is the difference between precedence, associativity, and order?

This confusion arises as most people are trained to evaluate arithmetic expressions as per PEDMAS or BODMAS rule whereas arithmetic expressions in programming languages like C# do not work in the same way. What are your takes on it? ...

bash: $[<arithmetic-expression>] vs. $((<arithmetic-expression>))

I have just stumbled upon the bash syntax: foo=42 bar=$[foo+1] # evaluates an arithmetic expression When I Googled for this, I found http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html#sect_03_04_05: 3.4.6. Arithmetic expansion Arithmetic expansion allows the evaluation of an arithmetic expression and the substitut...

A hard Question ?

Hi Guys , I try To find a solution to a question .... we have a number , example : 20 ... and we have 6 number :{ a ,b , c , d , e , f} < 20 , t try to find all values of these numbers , but only if we can combinate (whit + or -) whit 2 of this numbers and getting all the value below to 20 : for example we choose 31 : a = 22 ...