" 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 <math.h>
using namespace std;
double pierw(int x, int y)
{
double iloczyn = x*y;
if(iloczyn < 0)
{
return -1;
}
else
{
return sqrt (iloczyn);
}
}
void main()
{
int x,y;
cout << "Wpisz pierwsza liczbe: ";
cin >> x;
cout << "Wpisz druga liczbe: ";
cin >> y;
double wynik = pierw(x,y);
cout<<"Pierwiastek kwadratowy z iloczynu liczb "
<< x << " i " << y <<" wynosi: "<< wynik <<endl;
system("pause");
}