Problems to print the analog value on LCD

Hi guys,

someone know what there is of wrong in this code?
The number printed on terminal is different from the number printed on LCD!
Also, if I connect A11 pin to GND, on LCD I’ve a low random number.
If the same pin is floating, on LCD I obtain numbers that can reach also 9000 while on terminal the value is totally different.

If I connect the A11 pin to 3.3V the LCD shows the right number and also on the terminal I can see the same number (1023).
Someone can help me?

#include <LiquidCrystal.h>

LiquidCrystal lcd(25, 30, 37, 38, 39, 40);

void setup() {
  while (!Serial)  { ; }
  //- begin the lcd
  lcd.begin(16, 2);

void loop() 
	int16_t AD;
	AD = analogRead(A11);


I found the problem...
before to print the value, I need to clear the old value prined on LCD with lcd.print("0000");