#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char quit;
do {
int levels, sum = 0, current = 0, inc = 0, base = 0;
cout << "Enter the number of Levels: ";
cin >> levels;
cout << "Enter the base cost: ";
cin >> base;
cout << "Enter the Increment value: ";
cin >> inc;
while (current < levels)
{sum = sum + base+(inc*current);
current++;
cout << "Level " << current << " Level Cost: " << base+(inc*(current-1)) << " Total Cost: " << sum << endl;
};
cout << endl << "The Grand Total Cost is: " << sum << endl <<endl;
//Reset
cout << "Type 'R' to reset the program: ";
cin >> quit;
cout << endl << endl;
} while ( quit == 'R' || quit == 'r' );
return 0;
}