bewerking=bewerking3.proc
n=$teller
!if $graad=0
    R=$teller
!else
    R=$graad
!endif
!if $R=1    
    getal=!randitem 2,3,4,5
    factor=!randitem 2,4,6
    TELLER1=!randitem 2,4,6
    NOEMER1=!randitem -5,-6,-7,-8
    NOEMER1=$[ $factor*$NOEMER1 ]
!endif

!if $R=2    
    getal=!randitem 2,3,4,5
    factor=!randitem 2,4,6,8
    TELLER1=!randitem -2,-4,-6,-8
    NOEMER1=!randitem 5,6,7,8
    NOEMER1=$[ $factor*$NOEMER1 ]
!endif

!if $R=3    
    getal=!randitem 2,3,4,5
    factor=!randitem 2,4,6,8
    TELLER1=!randitem -2,-4,-6,-8
    NOEMER1=!randitem -5,-6,-7,-8
    NOEMER1=$[ $factor*$NOEMER1 ]
!endif

!if $R>3    
    getal=!randitem 2,3,4,5
    factor=!randitem -2,-4,-6,-8
    TELLER1=!randitem -2,-4,-6,8
    NOEMER1=!randitem -5,-6,-7,-8,-9
    NOEMER1=$[ $factor*$NOEMER1 ]
!endif


GOED1=$[$getal*$TELLER1]
GOED2=$NOEMER1

E=!exec pari ($getal*$TELLER1)/$NOEMER1
!if / notin $E
    GOED3=$E
    GOED4=1
    antwoord$n=$getal \times \frac{$TELLER1}{$NOEMER1} =\
    \frac{$getal \times $TELLER1}{$NOEMER1} =\
    \frac{$[$getal*$TELLER1]}{$NOEMER1} = \frac{$GOED3}{$GOED4} = $GOED3
!else
    E=!replace internal / by , in $E    
    GOED3=!item 1 of $E
    GOED4=!item 2 of $E
    antwoord$n=$getal \times \frac{$TELLER1}{$NOEMER1} =\
    \frac{$getal \times $TELLER1}{$NOEMER1} =\
    \frac{$[$getal*$TELLER1]}{$NOEMER1} = \frac{$GOED3}{$GOED4} 

!endif


##ant1/ant2 + ant3/ant4 = ant5ant6 
##GOED1/GOED2 + GOED3/GOED4 = GOED5/GOED6
!if $taal=nl
    nivo_title=een negatieve breuk en positief getal vermenigvuldigen & vereenvoudigen
    somtekst$n=<p align="left">Vermenigvuldig de negatieve breuk met het positieve getal en vereenvoudig het resultaat<br>\
    <small>indien mogelijk...</small>
!else
    nivo_title=Multiplication of a negative fraction and a positive integer
    somtekst$n=<p align="left">Multiply the fraction with the integer<br>\
    and reduce the outcome as far as you can.<br>\
    <small>if possible...</small>
!endif    

opgave$n=$getal \times \frac{$TELLER1}{$NOEMER1} =
