R=$graad
!if $negatief=0
    !if $taal=nl
	nivo_title=Rekenregels over vermenigvuldigen en optellen of aftrekken<br>alleen met positieve getallen
	hint=zie de help-pagina
    !else
	nivo_title=Calculating rules on multiplication, addititon and subtraction<br>only with positive numbers
	hint=look into the help-pages
    !endif

    !for n=1 to $aantal_sommen
	!if $graad=0
	    R=$n
	!endif    
	aa=!randitem 2,3,4
	b=!randitem 1,2,3,4,5
	c=!randitem 6,7,8,9,10
	d=!randitem 2,3,4,5,6,7
	e=!randitem 2,3,4,5
	a=$[$b*$c + $aa]
        !if $R=1
	    somtekst$n=$a - $b \cdot $c \,\,\,=\,\,\,    	
	    GOED$n=$[$a - $b*$c]
	    extra$n=$a - $[$b*$c] \,\,\,=\,\,\,    	
	!endif
	!if $R=2
	    somtekst$n=\left( $a - $b \right) \cdot $c \,\,\,=\,\,\,	
	    GOED$n=$[($a - $b)*$c]
	    extra$n=$[$a - $b] \cdot $c \,\,\,=\,\,\,	
	!endif
	!if $R=3 
	    somtekst$n=$aa \cdot ( $c - $b) \,\,\,=\,\,\,
	    GOED$n=$[$aa*( $c - $b)]
	    extra$n=$aa \cdot $[$c - $b] \,\,\,=\,\,\,
	!endif
	!if $R=4 
	    somtekst$n=$e \cdot \left( $a + $d \right) + $b \cdot $c \,\,\,=\,\,\,		
	    GOED$n=$[$e*$a + $e*$d + $b*$c]
	    extra$n=$e \cdot $[$a + $d] + $[$b*$c] = $[$e*($a+$d)]+ $[$b*$c] \,=\,\,\,		
	!endif
	!if $R=5
	    somtekst$n=\left( $a + $d - $b \right) \cdot $c \,\,\,=\,\,\,		
	    GOED$n=$[($a + $d - $b)*$c]	
	    extra$n=$[$a + $d - $b] \cdot $c \,\,\,=\,\,\,	
	!endif
	!if $R=6
	    somtekst$n=($a + $d ) \cdot $c - $b \,\,\,=\,\,\,		
	    GOED$n=$[($a + $d )*$c - $b]
	    extra$n=$[$a + $d] \cdot $c - $b = $[($a+$d)*$c] - $b \,\,\,=\,\,\,	
	!endif
	!if $R>6
	    somtekst$n=\left( $a + $d \right) \cdot \left( $c - $b \right) \,\,\,=\,\,\,		
	    GOED$n=$[($a + $d )*($c - $b)]
	    extra$n=$[$a + $d] \cdot $[$c - $b]\,\,\,=\,\,\,		
	!endif
    !next n
 !exit
!endif
!if $negatief=1  
    !if $taal=nl
	nivo_title=Rekenregels over vermenigvuldigen en optellen of aftrekken<br>nu ook met negatieve getallen
	hint=zie de help-pagina
    !else
	nivo_title=Calculating rules on multiplication, addititon and subtraction<br>also with negative numbers
	hint=look into the help-pages
    !endif
    !for n=1 to $aantal_sommen
	!if $graad=0
	    R=$n
	!endif     
	pm=!randitem -,+ 
	mp=!randitem -,+
	a=!randitem 1,2,3,4,5,6,7,8,9,10,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10
	b=!randitem 1,2,3,4,5
	c=!randitem 6,7,8,9,10
	d=!randitem 2,3,4,5,6,7
        !if $R=1
	    somtekst$n=$a $pm $b \cdot$c \,\,\,=\,\,\,    	
	    GOED$n=$[$a $pm $b*$c] 
	    extra$n=$a $pm $[$b*$c] \,\,\,=\,\,\,   	
	!endif
	!if $R=2
	    somtekst$n=\left($a $pm $b \right)\cdot$c \,\,\,=\,\,\,	
	    GOED$n=$[($a $pm $b)*$c]
	    extra$n=$[$a $pm $b] \cdot $c \,\,\,=\,\,\,	
	!endif
	!if $R=3 
	    somtekst$n=$a \cdot ( $b $pm $c) \,\,\,=\,\,\,
	    GOED$n=$[$a*( $b $pm $c)]
	    extra$n=$a \cdot $[$b $pm $c] \,\,\,=\,\,\,
	!endif
	!if $R=4 
	    somtekst$n=$a $pm $d $mp $b \cdot $c \,\,\,=\,\,\,		
	    GOED$n=$[$a $pm $d $mp $b*$c]	
	    extra$n=$[$a $pm $d] $mp $[$b*$c] \,\,\,=\,\,\,	
	!endif
	!if $R=5
	    somtekst$n=\left($a $pm $d $mp $b \right) \cdot $c \,\,\,=\,\,\,		
	    GOED$n=$[($a $pm $d $mp $b)*$c]
	    extra$n=$[$a $pm $d $mp $b] \cdot $c \,\,\,=\,\,\,		
	!endif
	!if $R=6
	    somtekst$n=\left( $a $pm $d \right) \cdot $b $mp $c \,\,\,=\,\,\,		
	    GOED$n=$[($a $pm $d )*$b $mp $c]
	    extra$n=$[$b*($a $pm $d)] $mp $c \,\,\,=\,\,\,		
	!endif
	!if $R>6
	    somtekst$n=\right( $a $pm $d \left) \cdot \left( $b $mp $c \right) \,\,\,=\,\,\,		
	    GOED$n=$[($a $pm $d )*($b $mp $c)]		
	    extra$n=$[$a $pm $d] \cdot $[$b $mp $c] \,\,\,=\,\,\,
	!endif
    !next n
!endif    