#include <cmath>
#include <iostream>
int main(void)
{
int levels = 40;
int xp_for_first_level = 1000;
int xp_for_last_level = 1000000;
double B = log((double)xp_for_last_level / xp_for_first_level) / (levels - 1);
double A = (double)xp_for_first_level / (exp(B) - 1.0);
for (int i = 1; i <= levels; i++)
{
int old_xp = round(A * exp(B * (i - 1)));
int new_xp = round(A * exp(B * i));
std::cout << i << " " << (new_xp - old_xp) << std::endl;
}
}
int MEG = Convert.ToInt32(MAX.Text) * 2 / Convert.ToInt32(RESULT.Text); //300
int UP = MEG / Convert.ToInt32(RESULT.Text);// = 3
int result = UP;
for (int i = 1; i<=Convert.ToInt32(RESULT.Text) + 1;i++)
{
textBox1.Text += UP + Environment.NewLine;
UP = UP + result * i;
otr.Text = (i-1).ToString();
}
вот тебе в довесок https://ru.wikipedia.org/wiki/Список_ORM-библиотека вчера узнал про RedBeanPHP
SteamBoost [VALVE-MS RU] |