iam asking about chimical equations how can i programme it to the computer how can i make the computer understand that
c+o2=co2
or naoh + hcl =nacl+h2o
i mean how he understand that acid +alkail= water +salt

The computer does not understand much. The computer can produce some output, being given a certain input. Before writing a program, you can start by defining the output that you expect (for example a file containing some data), and the input that you intend to give to the program (for example another file containing data) and algorithms to produce automatically the output from the input.

Except at the most fundamental level, chemistry is not math. You can do this with a rules-based language or API that "understands" chemical interactions and can transform your input (left side of the equation) into the output (right side). Not simple, but a very good senior or graduate level (masters degree perhaps) project.

FWIW, you will probably have to write the rules.