# optellen en aftrekken [type: a/x+c/b]
questiontype=7
javascript=js/exo1.js
image=0
XSIZE=650
embed=1
mathview=2
cols=20
rows=1
inputs=1
math=1
n=$counter
var1=1
#schrijf als 1 breuk
R=$level
!if $level=0
    R=$counter
!endif    
pm=!randitem +,-
mp=!randitem 1,-1
checkfile=exos/checkfile1.proc
x=!randitem x,y,a,b,c,m
varlist=$x
exotext=!record 1 of lang/remarks.$taal
sometext=!record 3 of lang/remarks.$taal
exotext=<p><a onmouseover="return escape('$sometext')"> $exotext </a>
question$n=!record 8 of lang/remarks.$taal

!if $R=1
    a=!randitem 1,2,3,4,5,6,7,8,9
    a=$[$mp*$a]
    b=!randitem 2,3,4,5,6,7,8,9
    formula$n=\frac{$a}{$x} $pm \frac{1}{$b} \,\, \rightarrow \,\,
    answer$n=($[$a*$b] $pm $x)/($b*$x)
    texanswer$n=\frac{$a}{$x} $pm \frac{1}{$b} =\frac{$b \cdot $a}{$b $x} $pm \frac{$x}{$b $x}=\frac{$[$b*$a] $pm $x}{$b $x}
    var1=$a/$x $pm 1/$b
 !exit
!endif

!if $R=2
    a=!randitem 1,2,3,4,5,6,7,8,9
    b=!randitem 3,4,5,6,7,8
    c=$[$b-1]
    a=$[$mp*$a]
    formula$n=\frac{$a}{$x} $pm \frac{$c}{$b} \,\, \rightarrow \,\,
    answer$n=($[$a*$b] $pm $c*$x)/($b*$x)
    texanswer$n=\frac{$a}{$x} $pm \frac{$c}{$b} = \frac{$b \cdot $a}{$b $x} $pm \frac{$c $x}{$b $x}=\frac{$[$b*$a] $pm $c $x}{$b $x}
    var1=$a/$x $pm $c/$b
 !exit
!endif

!if $R>2
    a=!randitem 1,2,3,4,5,6,7,8,9
    b=!randitem 2,3,4,5
    a=$[$mp*$a]
    formula$n=\frac{$a}{$x} $pm \frac{$x}{$b} \,\, \rightarrow \,\,
    answer$n=($[$a*$b] $pm $x^2)/($b*$x)
    texanswer$n=\frac{$a}{$x} $pm \frac{$x}{$b} = \frac{$b \cdot $a}{$b $x} $pm \frac{$x^{2}}{$b $x}=\frac{$[$b*$a] $pm $x^{2}}{$b $x}
    var1=$a/$x $pm $x/$b
 !exit
!endif
