tmp=1,1,Resolver la ecuación siguiente :,ecuación\
2,2,Resolver el sistema de ecuaciones siguiente :,ecuación\
1,1,Resolver la inecuación siguiente :,incuación
!bound mode between 1 and 3 default 1
!bound difficulte between 1 and 3 default 1
!bound natcoef within entier,entierrel,fractions,fractionsrel,decimal1,decimal1rel,decimal2,decimal2rel default entier
!bound nocalcul within 0,1 default 1
!bound nbreexo between 1 and 8 default 1

tmp=!line $mode of $tmp
!distribute items $tmp into nbreequ,nbreinc,enonce,nom

val40=$tmp

listinc=x,y\
u,v\
a,b
listinc=!randline $listinc
listinc=!item 1 to $nbreinc of $listinc

val41=$listinc
!if decimal isin $natcoef
 maxdecimale=5
!else 
 maxdecimale=0
!endif

!if $mode=1 or $mode=3
!readproc generateur.don $natcoef,5
!distribute items $list into tmp1,tmp2,tmp3,tmp4,tmp5
!if $tmp1=$tmp3
   tmp1=$tmp1+1
!endif
!if $tmp1*$tmp2=$tmp3
   tmp2=$tmp2+1;
!endif
tmp=($tmp1)*$listinc+($tmp2),$tmp3\
($tmp1)*$listinc+($tmp2),($tmp3)*$listinc+($tmp4)\
$tmp1*(($tmp2)*$listinc+($tmp4)),($tmp3)*$listinc+($tmp5)

tmp=!line $difficulte of $tmp
val43=$tmp
!distribute items $tmp into tmp1,tmp2
tmp=!exec pari print($tmp1)\
print($tmp2)
val42=$tmp
!distribute lines $tmp into tmp1,tmp2
!if $mode=1
   tmp3=1
!else
   tmp3=!randint 2,5
!endif
sys0=$tmp1,$tmp3,$tmp2
!endif

!if $mode=2
 !readproc generateur.don $natcoef,6
 !distribute items $list into tmp1,tmp2,tmp3,tmp4,tmp5,tmp6
 !distribute items $listinc into tmp7,tmp8
 !if $difficulte=1
  tmp1=0
 !else
  !if $difficulte=2
   tmp1=!randitem 1,-1
  !endif
 !endif
 tmp9=!shuffle $tmp1,$tmp2,$tmp3,$tmp4
 tmp10=!positionof item $tmp1 in $tmp9
 !distribute item $tmp9 into tmp1,tmp2,tmp3,tmp4
 tmp9=$[($tmp1)*($tmp4)-($tmp2)*($tmp3)]
 !if $tmp9=0
  tmp11=!listcomplement $tmp10 in 1,2,3,4
  tmp11=!randitem $tmp11
  $(tmp$tmp11)=$[$(tmp$tmp11)+1]
 !endif
 tmp=!exec pari print(($tmp1)*$tmp7+($tmp2)*$tmp8)\
print(($tmp3)*$tmp7+($tmp4)*$tmp8)\
print(($tmp1)*($tmp5)+($tmp2)*($tmp6))\
print(($tmp3)*($tmp5)+($tmp4)*($tmp6))
 !distribute lines $tmp into tmp1,tmp2,tmp3,tmp6
 sys0=$tmp1,1,$tmp3\
 $tmp2,1,$tmp6
!endif

nbetape=0
nbetapeop=10
comment0=$empty

val44=$nbreexo
val45=$noexo
