next up previous
Next: Bingham's correlation Lab Up: Exercises Previous: Exercises

Nernst Equation

Nernst equation describes the relationship between the cell potential and the concentration of the cell components. The cell potential $E$ is given by:

\begin{displaymath}E = E^o -\frac{RT}{nF}ln(Q) .\end{displaymath}

Where $E^o$ is the cell potential at standard conditions, $n$ is the number of moles of electrons, $F$ is the charge per mole of electrons, $T$ is the temperature, R is the gas constant, and $Q$ is the reaction quotient.

Write a main() program that receives as input the cell potential at standard conditions, the number of moles of electrons, the charge per mole of electrons, the temperature, and the reaction quotient; and and outputs the cell potential. The input is from the standard input, the keyboard. The results are sent to the standard output, the screen.



J. C. Diaz 2004-01-19