Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int POTEGA (int x, int y) {
- int i;
- int w=1;
- for (i=0;i<y;i++) {w=w*x;}
- return w;
- }
- int main()
- {
- cout<<"Potega liczb wynosi: "<<POTEGA(2,4)<<endl;
- cout<<"Potega liczb wynosi: "<<POTEGA(3,3)<<endl;
- cout<<"Potega liczb wynosi: "<<POTEGA(1,11)<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement