save variables in running

I want to save a variable. It must can be edit and resave in program memory while program is running. variable cannot reset at power cuts. is it possible?

Yes, it's possible. Which Arduino board are you using?

Use EEPROM.
https://www.arduino.cc/en/Reference/EEPROM