Combining code for multiple sensors (Current and Voltage Sensors) in one program
How to combine two sketches.

First, make sure every global variable and function name is unique (except setup and loop). Choose the smallest sketch and rename its. variables, function names and any other named items (like DEFINE).

Is convenient to refactor things. I extract the code for reading Voltage and Current to separate functions, to reduce the count of global variable and length of each function, making things easier by reducing the side of setup() and loop().

Now, combine the code inside the setup and loop:

const int analogInput = A1;

void setup() {
  Serial.begin(9600);
  pinMode(analogInput, INPUT);
}

void loop(){
  Serial.print(getCurrent());  
  Serial.print(" "); 
  Serial.println(getVoltage(),2);
  delay(500);
}

float getCurrent() {    
  float average = 0;
  for(int i = 0; i &lt; 1000; i++) {
    average = average + (.0264 * analogRead(A0) -13.385) / 1000;//this is 
    //for the 5A mode, if 20A or 30A mode, need to modify this formula to 
    //(.19 * analogRead(A0) -25) for 20A mode and 
    //(.044 * analogRead(A0) -3.78) for 30A mode
    delay(3);
  }
return average;
}

float getVoltage() {
   const float R1 = 30000.0; //  
   const float R2 = 7500.0; // 
   float value = analogRead(analogInput);
   float vout = (value * 5.0) / 1024.0; // see text
   float vin = vout / (R2/(R1+R2)); 
  return vin;
}