can i write code into xbee s2c

can i write code into xbee s2c in built like when i first time press push botton then reciving side output is 25%,second time when i press pushbotton then recieving side output is 50% likewise continously incrasing.

No, you will need your own external microcontroller

Not on the S2C directly. But if you purchase the Programmable versions, or an external processor, then yes you could.