//============================================================== // Funkcje; przeciazanie funkcji - 2 (overlapped).
//
// ver data temat autor // 100 2001/10/11 Pierwszy projekt J.Malinowski // 102 2019/08/25 Cleanup JM //============================================================== #pragma hdrstop #pragma argsused #include <iostream> #include <conio.h> using namespace std; //============================================================== // Prototypy funkcji
int Square( int ); float Square( float ); double Square( double );
//============================================================== int main() { int ix=5; float fx=15.5; double dx=25.5; cout << endl << ix << "^2 = "; ix = Square( ix ); cout << ix; cout << endl << fx << "^2 = "; fx = Square( fx ); cout << fx; cout << endl << dx << "^2 = "; dx = Square( dx ); cout << dx << endl; getch(); return 0; } //============================================================== // Implementacje funkcji
int Square( int x ) {
cout<<" (f-cja z \"int-em\") "; return x*x;
float Square( float x ) {
cout<<" (f-cja z \"float-em\") "; return x*x;
}
double Square( double x ) {
cout<<" (f-cja z \"double-m\") "; return x*x;
}