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
Sample Output
2 1 1 2
1 1 1 1

A bit of a tall order. An application like this (written from scratch) would take a lot of work. First, it would have to be able to recognize individual elements symbolically, then it would have to iterate through solutions and reduce. Why not take a whack at it yourself and then post if you get stuck?

I agree with TeejMonster!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.