how to combine two code of arduino uno
Put the stuff before setup() together, fix any duplicates:

int mamank=13; &lt;&lt;&lt; pin assignment? If yes, this can be byte
int red=2; &lt;&lt;&lt; pin assignment? If yes, this can be byte
int green=3; &lt;&lt;&lt; pin assignment? If yes, this can be byte
int blue=4; &lt;&lt;&lt; pin assignment? If yes, this can be byte


Put the stuff in setup() together, fix any duplicates

void setup() { 
pinMode (mamank,OUTPUT); 
Serial.begin(9600);
pinMode (red,OUTPUT); 
pinMode (green,OUTPUT); 
pinMode (blue,OUTPUT); 
Serial.begin(9600);  &lt;&lt;&lt; duplicate, so delete this line
}


Put the stuff in loop() together, then check the desired functionality:

void loop() { 
int sensorValue = analogRead(A0); 
Serial.println(sensorValue); 
if (sensorValue&gt;550) {
digitalWrite(mamank,HIGH); 
}
else if (sensorValue&lt;500) {
digitalWrite(mamank,LOW); 
}
delay(100);
// read the input on analog pin 0: 
int value = analogRead(A1);
if (value &gt; 500) { 
Serial.println("Very heavy Rain"); 
digitalWrite (red,HIGH); 
digitalWrite(green,LOW); 
digitalWrite(blue,LOW);
} 
else if ((value &gt; 300) &amp;&amp; (value &lt;= 500)) { 
digitalWrite (green,HIGH); 
digitalWrite (red,LOW); 
} 
else { 
Serial.println("Dry Weather"); 
digitalWrite (blue,HIGH); 
digitalWrite (red,LOW); 
digitalWrite (green,LOW); 
delay(100); 
} 

}