Programs can be written to have as many variables as you need, but you can solve this problem with just one.
Los programas se pueden escribir para tener tantas variables como necesites, pero puedes resolver este problema con solo una.