then nothing changed!!!
Slow down. Swearing doesn't help you think logically.
it means the code's completely wrong!
It depends on what you meant by "the code".
I asked for the solution in another forum, and no one helped my.
Maybe because you didn't help others help you.
Others can point out issues for you but in the end, it is better if you learn to think logically so you can spot issues all by yourself in the future.
Take your code for example. You have to figure out if it is a display problem (the right temp isn't being display'd correctly), or it is a measurement problem (the right temp isn't obtained by the adc routine.
One way to ascertain that is to provide temp a known value ("temp = 180;" or "temp = 120;"), right after the adc function.
Depending on the code's behavior after that, you can track down the issues.
Two more advises for you:
1) get a decent C book and make sure you really understand it - your code now fails a C 101 class assignment;
2) learn a good coding habit. For example, comment your code as much as you can and write modular code blocks.