• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

UpgradeCostCalculator V1.00

  • Like
Reactions: deepstrasz
Calculates the total, and cost per level for upgrades.

Written in C++ (code below)

If the program doesnt work, you may not have the latest version of .net framework
If your problem is still unresolved, post here, for troubleshooting

Keywords:
upgrades, calculator, balance
Contents

UpgradeCostCalculator V1.00 (Binary)

Reviews
13:50, 13th Feb 2010 TriggerHappy: Would prefer some kind of GUI, but useful nonetheless.

Moderator

M

Moderator

13:50, 13th Feb 2010
TriggerHappy:

Would prefer some kind of GUI, but useful nonetheless.
 
Hope you find it useful, even though its fairly simple

Program may also be used for Hero Experience needed, since they fall under the same formula.

Feel free to do whatever you wish with the source code, I dont even care if you credit me.
Code:
#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;
}
 
Last edited:
Top