3 code and 4 code

code for 3 and 4