Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int x,y,c=1;
- int POTEGA(int x, int y){
- for (int i = 0; i<y; i++){
- c = c * x;
- }
- return c;
- }
- int main()
- {
- cout << "Podaj podstawe: " << endl;
- cin >> x;
- cout << "Podaj wykładnik: " << endl;
- cin >> y;
- cout << POTEGA(x,y);
- return 0;
- }
Add Comment
Please, Sign In to add comment