title: How to make program output differently depending on number of runs?
body: <p>This is not like a code help or code review thing.I am trying to make a counter for my program that can define the output of my program.For eg: If i want my program do specific thing after it has been run two times or else it should do another thing.Another example of what i am trying to say is that when i run my program first and second time it should print 3,but when i run it third time it should print 5.
  I believe there are many ways already out there,but i don't know how to search such type of specific query on google.</p>
  
  <p>I am working on complex program,where such type of thing is required,but i don't know where and how to start or look.I tried to make a counter,but every time the program runs,it initializes the value of counter and so it doesn't increment.</p>