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;
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
Post a Comment