You don't need to change anything in the program, because it doesn't matter what you use as power source (PC, battery or potatoes).
But as I know Arduino is powered by 5.0v so you need a converter (L7805) or you can use 3 1.5v batteries (3*1.5 = 4.5)