Balancing chemical equations

Page 1 of 1

1 Replies - 757 Views - Last Post: 05 August 2009 - 03:18 PM Rate Topic: -----

#1 dejandenib  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 10-June 09

Balancing chemical equations

Posted 05 August 2009 - 03:09 PM

Can anyone give me a solution for this?
the program should output how can the chemical equation be balanced (which are the coefficients)
28th ACM International Collegiate Programming Contest, 2003-2004 Asia Region, Tehran Site
Balanced Chemical Equations
Sample Input
3
HCl+CaO2H2=CaCl2+H2O
HCl+H2SO4=NaCl
HCl+NaOH=NaCl+H2O
Sample Output
2 1 1 2
IMPOSSIBLE
1 1 1 1
Is This A Good Question/Topic? 0
  • +

Replies To: Balancing chemical equations

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Balancing chemical equations

Posted 05 August 2009 - 03:18 PM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1