← SAP questions

Print alternate numbers with each run of the program

Filed under SAP

Write a program that prints alternate odd numbers (1, 3, 5, ...) across consecutive executions. The program must persist its state in a file so that each time it is run, it knows which number to print…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related SAP questions

Collected from public candidate posts and coding forums. Updated Nov 2026.