# vereenvoudig [ type: 2a^2/(4a) ] 
questiontype=7
javascript=js/exo1.js
image=0
XSIZE=650
embed=1
mathview=2
cols=20
rows=1
inputs=1
n=$counter
math=1
R=$level
var1=1
#schrijf als 1 breuk
!if $level=0
    R=$counter
!endif    
pm=!randitem +,-
ppm=!randitem +,-
mp=!randitem 1,-1
question$n=!record 12 of lang/remarks.$taal
#@Vereenvoudig;
checkfile=exos/checkfile1.proc    
x=!randitem x,y,a,b
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>

# var1= letterlijke vraag in wiskunde
!if $R=1
    a=!randitem 2,3,4,5
    b=!randitem 2,3,4,5
    c=$[$a*$b]
    formula$n=\frac{$a $x}{ $c } \rightarrow
    answer$n=$x/$b
    texanswer$n=\frac{$a $x}{ $c } = \frac{$a $x}{$a \cdot $b} = \frac{$x}{$b}
    var1=$a*$x/$c
 !exit
!endif

!if $R=2
    a=!randitem 2,3,4,5
    b=!randitem 2,3,4,5
    g=!randitem 3,4,5,6
    pm=!randitem 1,-1
    c=$[$pm*$a*$b]
    d=$[$b+1]
    f=$[$a*$d]
    e=$[$g-1]
    b=$[$pm*$b]
    formula$n=\frac{$c $x^{$g}}{$f $x} \rightarrow
    answer$n=($b*$x^$e)/$d
    texanswer$n=\frac{$c $x^{$g}}{$f $x} =  \frac{ $a \cdot $b \cdot $x \cdot $x^{$e} }{$a \cdot $d \cdot $x } = \frac{ $b \cdot $x^$e }{ $d }
    var1=($c*$x^$g)/($f*$x)
 !exit
!endif

!if $R>2
    a=!randitem 2,3,4,5
    b=!randitem 2,3,4,5
    e=!randitem 2,3,4
    g=!randitem 6,7,8,9
    pm=!randitem 1,-1

    c=$[$pm*$a*$b]
    d=$[$b+1]
    f=$[$a*$d]
    h=$[$g-$e]
    b=$[$pm*$b]
    
    formula$n=\frac{$c $x^{$e}}{ $f $x^{$g}} \rightarrow
    answer$n=$b/($d*$x^$h)
    texanswer$n=\frac{$c $x^{$e}}{ $f $x^{$g}} =\frac{ $a \cdot $b \cdot $x^{$e}}{$a \cdot $d \cdot $x^{$e} \cdot $x^{$h}} = \frac{$b}{$d \cdot $x^{$h}}
    var1=($c*$x^$e)/($f*$x^$g)
 !exit
!endif
