" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
#include <iostream>
#include <cmath>
using namespace std;
double funkcja (int a, int b)
{
int iloczyn = a*b;
if(iloczyn >= 0)
return sqrt(iloczyn);
else
return -1;
}
int main(int argc, char *argv[])
{
int a,b;
cout<<"Podaj a:"<<endl;
cin>>a;
cout<<"Podaj b:"<<endl;
cin>>b;
double wynik = funkcja(a,b);
cout<<"Wynik wynosi: "<<wynik<<endl;
system("PAUSE");
return 0;
}