/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package progression;

/**
 *
 * @author kvaradar
 */
public class Progression {

    protected long first;

    protected long cur;

    Progression() {
        cur = 0;
        first = 0;
    }

    protected long firstValue() {
        cur = first;
        return cur;
    }

    protected long nextValue() {
        return ++cur;
    }

    public void printProgression(int n) {
        System.out.print(firstValue());
        for (int i = 2; i <= n; i++)
            System.out.print(" " + this.nextValue());
        System.out.println();
    }

}
