Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- class lul{
- private:
- int a;
- public:
- void init();
- void seta(int,int);
- int geta();
- };
- void lul::init(){
- a=0;
- }
- void lul::seta(int d, int f){
- a=pow(d,f);
- }
- int lul::geta(){
- return a;
- }
- using namespace std;
- int main()
- {
- lul xd;
- int f1, f2;
- cout << "Введіть значення, яке буде відноситись до степеня : ";
- cin >> f1;
- cout << "Введіть значення, до якого буде підноситись число : ";
- cin >> f2;
- xd.init();
- xd.seta(f1, f2);
- cout << "Значення а = " << xd.geta() << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement