geekbrains_oop_cpp/lesson_1/exercise_1.hpp

22 lines
253 B
C++
Raw Normal View History

2021-06-18 22:15:56 +00:00
#include <math.h>
class Power
{
private:
float a = 0;
float b = 0;
public:
Power() {}
void set(float num_a, float num_b)
{
a = num_a;
b = num_b;
}
float calculate()
{
return pow(a, b);
}
};