Equation solving in Programming

ans=(k*g)/(g1*g2);  (If the answer is an integer).


In these types of Equation solving program ,try to avoid multiplication .

Always do division to find the answer ,Otherwise there is a very possibilty of getting WA .

So, in 1st step:       g1=g1/g;

          2nd step :     ans=k/g1;

          3rd step :      ans=ans/g2;

Comments

Popular posts from this blog

A. Dreamoon and Stairs : minimum steps to reach : recursion solution.

Getting Started With MEAN App Development with AngularJs , ExpressJs , NodeJs and MongoDB.

B. Dreamoon and WiFi :calculate no. of ways : recursive solution (branch and bound )