Program – potęga x^y
Napisano w Programy
#include<iostream>
#include<cstdlib>
using namespace std;
int x,y,w=1;
int main()
{
cout << „*********************************************************\n”;
cout << „**************** Potęga x^y ******************************\n”;
cout << „*********************************************************\n\n\n”;
cout << „podaj wykladnik x=”;
cin >> x;
cout << „podaj potege y=”;
cin >> y;
for(int i=0;i<y;i++)
{
w*=x;
}
cout << „wynik =” << w << endl << endl;
system(„pause”);
}