Advertisement
marius7122

Untitled

Jul 4th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int x, y, i, p;
  6.  
  7. int main()
  8. {
  9.   cout<<"x= "; cin>>x;
  10.   cout<<"y= "; cin>>y;
  11.  
  12.   p = 1;
  13.  
  14.   for(i=0; i<y; i++)
  15.   {
  16.     p = p * x;
  17.   }
  18.  
  19.   cout<<p;
  20.  
  21.   return 0;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement