//============================================================== // Funkcje; przeciazanie funkcji (1).
//
// ver data temat autor // 100 2001/10/11 Pierwszy projekt J.Malinowski // 102 2019/08/25 Cleanup JM //============================================================== #include <iostream> #include <conio.h> #include <math.h> using namespace std; //============================================================== float Potega( float, int );
float Potega( float, float );
//============================================================== int main() { float x=3.5,y=2.0; int n=3; cout << Potega( y, n ); cout << Potega( y, x ); getch(); return 0; } //============================================================== float Potega( float y, int n )
{
float w=y;
for( int i=1; i<n; i++ ) w=w*y;
cout << "\nf-cja 1\n"; return w;
}
//---float Potega( //---float y, //---float x )
{ float w; w=exp( x* log( y ) ); cout << "\nf-cja 2\n"; return w; } //==============================================================