compare two analog voltages

hi. I am a still beginner in ardunio, I need a program to compare two analog voltages (inputs) and light a led when they are different in values. How to code it?

As a start, how about you try reading an analogue input and printing the value ? Look in the IDE examples as a starting place.

There is a built in analog comparator, but it will tell you only if one voltage is greater than another.
See Gammon Forum : Electronics : Microprocessors : Using the Arduino Analog Comparator