How do i combine two Arduino sketches?

I am a newbie, I’m in trouble now. I found two codes on the internet, but do not know how to combine them into one. I hope there is a help. Thank you


i2c_LCDSmartie_Project_V1_1.ino (13.9 KB)

Control_Relay_with_IR.ino (587 Bytes)

This Simple Merge Demo may be useful.


Then there is this:-