kill(all)$

Maxima : reaction  Formula  'read :enter products'  , 'version 1.0' ,part: '3c'
peter.vlasschaert@gmail.com, 01/11/2019

?  How to give information to maxima ( products )
======================================
npb : number of  products ( = before reaction)
coef 'products' : {x1,x2,.....}
products :{NaOH,H2SO4}
--------------------------------------------------------------------
npa : number of products  (=  after reaction   )
coef 'products' : {y1,y1,.....}
products :{H2O,Na2SO4}
--------------------------------------------------------------------
el  : elements in the reactions:{Na,O,H,S}
--------------------------------------------------------------------

reaction :
=======

x2*H2SO4+x1*NaOH=y2*Na2SO4+y1*H2O

rem : remove ' read ' use  the key : 'Backspace'

general info : find coef of the  reaction
=============================
{x1,x2,.....}  &  {y1,y2,....}

print( "How to enter elements = [Na,O,H,S]")$

el : read( "elements in the reaction   :'shift' & 'enter'  = ")$

products : before reaction
====================

print(" number of products : integer")$

npb : read( "number products (before reaction)   :'shift' & 'enter'       = ")$

 => enter product  ( before reaction )
products : {NaOH,H2SO4}

qb[1]:[[Na,1],[O,1],[H,1],x1];
qb[2]:[[H,2],[S,1],[O,4],x2];

see : website
==========
part  3a,3b : definition : formula,bproducts

for i:1 thru npb do(
    qqb[i] :delete(last(qb[i]) ,qb[i])
);

qqb[1];
qqb[2];

products : after reaction
==================

print(" number of products : integer")$

npa : read( "number products (after reaction)   :'shift' & 'enter'       = ")$

 => enter product  ( after reaction )
products : {H2O,Na2SO4}

qa[1]:[[H,2],[O,1],y1];
qa[2]:[[Na,2],[S,1],[O,4],y2];

see : website
==========
part  3a,3b : definition : formula,bproducts

for i:1 thru npa do(
    qqa[i] :delete(last(qa[i]) ,qa[i])
);

qqa[1];
qqa[2];