BeetonZ Infotech interview question

Pattern question in programming and logical question