The pitch is the standard note you have to approach. For the A, this is 440 Hz, officially, but more and more musicians and instruments are tending it up, as this can be 441, 442, ...
For programming, you'd better let the user fix its standard A (let him go between 440 and 449, for example, by steps of 1 Hz). Then the A one octave up will be 880, 882 ... depending of the user's initial choice.
You will have to compute the other notes on a log scale (by twelve intervals), and the best will be to show the distance between the frequency heard and the closest note.
See this example : http://members.efn.org/~qehn/global/building/cents.htm