See:
Man Page for bash (linux Section 1) - The UNIX and Linux Forums
Section: ARITHMETIC EVALUATION (c&p)
And besides, you already have done adding two numbers.
See the generation of your 2nd random number.
However, i assume you ment, you dont know how to actualy work with the results?
You did set
n=$RANDOM which means the variable
$n now contains the value of
$RANDOM, which is a (not a technical-term-ace) global variable, generating a random number between 0 and 32,7k.
Well, so you need to put that result, that is nicely packed as an expression
$(( r %= 200 )) into a variable.
Lets call that variable
NUM1, so the (typo-corrected) code would look like
NUM1=$(( n %= 200 )).
You then can see the result by
echo $NUM1.
Then you can add the numbers using
$NUM1 and
$variable_b (as another example) instead.
NOTE: Variables are case sensitive and remain with their values in the shell until its exit.
Variables from scripts are not accessable from the shell unless the script exports them.
Hope this helps