Arduino Leonardo

I just purchased 2 Arduino Leonardo boards and I am trying to program them with the following code. However, I cannot program either one of the boards.

Does anyone know why I cannot program the boards?

// Pin & Variable definitions

const int VADC = A0;

// Initialization
void setup()
{
  // Initialize 

  Serial.begin(9600);
analogReference(DEFAULT);

} 


// Main loop
void loop()
{

  // Sample the ADC voltage
  float VADC_voltage = analogRead(VADC) * (5 / 1023);
  float Vcap = -213.48*VADC_voltage;
  // Serial.println(VADC_voltage);     //Input Voltage @ Pin A0 that represents Capacitor voltage
  Serial.println(Vcap);             //Calculated Capacitor Voltage
  // Serial.println(analogRead(VADC)); //ADC Counts for input volatge @ Pin A0
  
}

Programming Error is below: Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 1782 bytes (5%) of program storage space. Maximum is 32256 bytes. Global variables use 188 bytes (9%) of dynamic memory, leaving 1860 bytes for local variables. Maximum is 2048 bytes. An error occurred while uploading the sketch

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

You compile for an Uno board, select a Leonardo instead.

Thanks for your help on the Arduino Leonardo

I am also having a programming issue on an Arduino Uno. The programming error is below. Please let me know if you know what the problem is.

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 1782 bytes (5%) of program storage space. Maximum is 32256 bytes. Global variables use 188 bytes (9%) of dynamic memory, leaving 1860 bytes for local variables. Maximum is 2048 bytes. avrdude: verification error, first mismatch at byte 0x0000 0x62 != 0x0c avrdude: verification error; content mismatch avrdude: verification error; content mismatch

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.