#include using namespace std; using uint = unsigned int; class Pog { private: float first; uint second; public: Pog(float a0, uint d) { this->first = a0; this->second = d; } float operator()(uint j) { return this->first + this->second * (j - 1); } }; int main() { float a0 = 2.5f; uint d = 5, j = 2; Pog pg(a0, d); cout << pg(j); return 0; }