almost done with sim_eqn.cpp

now only the set function is left which depends on user input. and also
the initialization of the ans array X[] is a bit weak.