!if $taal=nl
    somtekst1=Reken de volgende som uit<br>\
    en vereenvoudig de uitkomst zo ver mogelijk:<br>
    nivo_title=integer getal en breuk.
!else
    somtekst1=Calculate and fill in the blancs<br>\
    and don't forget to reduce the outcome:<br>
    nivo_title=Integer and Fraction.    
!endif
bewerking=bewerking1.proc
    
!if $negatief=0
    lijst_a=!shuffle 1,2,3,4,1,2,3,4
    lijst_b=!shuffle 4,5,6,7,4,5,6,7
    lijst_c=!shuffle 2,3,4,5,6,7,8,9,10,11,12,13,14,15
!else
    lijst_a=!shuffle 1,2,3,4,5,6,-1,-2,-3,-4,-5,-6
    lijst_b=!shuffle 4,5,6,7,8,9,10,-4,-5,-6,-7,-8,-9,-10
    lijst_c=!shuffle 2,3,4,5,6,7,8,-2,-3,-4,-5,-6,-7,-8
!endif
    
totaal=$empty
R=$graad
!for n=1 to $aantal_sommen
    !if $negatief=0
	!if $graad=0
	    R=$n
	!endif
	!if $R=1
	    b=!item $n of 10,12,14,16,18,22
	    a=$[$b/2]
	    c=2	
	!endif		
	!if $R=2
    	    a=$n
	    b=!item $n of $lijst_b
	    c=$[$n*$b]
	!endif
	!if $R>2
	    a=!item $n of $lijst_a
	    b=!item $n of $lijst_b
	    c=!item $n of $lijst_c	
	!endif
    !else	
	a=!item $n of $lijst_a
	b=!item $n of $lijst_b
	c=!item $n of $lijst_c
    !endif
    som$n=$c*($a)/($b) 
    opgave$n=$c \cdot  \frac{$a}{$b}
    totaal=!append line $(som$n) to $totaal
    totaal=!append line printtex($(som$n)) to $totaal 
!next n

totaal=!exec pari $totaal

i=1
!for n=1 to $aantal_sommen
    GOED$n=!line $i of $totaal
    goed$n=!line $[$i+1] of $totaal
    i=$[$i+2]	 
!next n
