Reading Voltage with a pro mini

Hello!
Im trying to make a simple program that reads voltage and prints it to the serial monitor. I have a circuit where the ground connects to a 1.5V battery and the battery connects to port A3. I am using this code for it:

#define reading A3
void setup() {
  // put your setup code here, to run once:
  analogRead(reading);
 Serial.begin(9600); 
 pinMode(reading, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
int pulse = analogRead(reading);
float Voltage = (pulse*(3.3/1023));
Serial.print(Voltage);
delay(1000);
Serial.print('\n');
}

It works and prints the proper voltage of the battery that I am hooking up to it, but as soon as the connection is broken it starts to print nonsense that ranges between 0 and 3.3. How can I fix this issue?

You are leaving the pin disconnected from any circuit, so it is picking up noise from your environment. Tell your program that you are disconnecting so it will ignore reding and printing the voltage.
If you want to begin reading the voltage again, then tell your program to begin doing that.

Try connecting a medium-range resistor from A3 to ground. This should ground the pin and give you a zero value when the battery is disconnected. When the Arduino detects zero, stop printing.

I would start testing with 10K, which will draw a small current from the battery.