Skip to content

Instantly share code, notes, and snippets.

@aveao
Last active July 17, 2016 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aveao/dccec7f309bf6caafd55 to your computer and use it in GitHub Desktop.
Save aveao/dccec7f309bf6caafd55 to your computer and use it in GitHub Desktop.
Steam Level/Price calculator
int SteamLevel = 1111; //edit this as you want
double PricePerBadge = 0.4; //change this for yourself
double price = 0; //don't touch
for (int i = 0; i < SteamLevel; i++)
{
price += (Math.Floor((double)(i/10))+1)*PricePerBadge;
}
Console.WriteLine(price.ToString());
//I coded this on http://csharppad.com/, that is why this looks a bit weird.
int FromSteamLevel = 33; //edit this as you want
int ToSteamLevel = 35; //edit this as you want
double PricePerBadge = 0.4; //change this for yourself
double price = 0; //don't touch
for (int i = FromSteamLevel; i < ToSteamLevel; i++)
{
price += (Math.Floor((double)(i/10))+1)*PricePerBadge;
}
Console.WriteLine(price.ToString());
//I coded this on http://csharppad.com/, that is why this looks a bit weird.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment