Unable to make logic

I can’t able to make logic please help me