#include <iostream>
#include<cmath>
using namespace std;
int main()
{
float x, y;
cout << "Unesite parametar funkcije (x):" << endl;
cin >> x;
if (x<=0.5)
{
y=sqrt (fabs(pow(x,2)+3*x+2));
cout << "Za x=" << x <<" funkcija y=koren|x*x+3*x+2|=" << y << endl;
system("PAUSE");
return 0;
}
if (0.5<x<=1.5)
{
y=log(x+1);
cout << "Za x=" << x <<" funkcija y=ln(x*x+5)=" << y << endl;
system("PAUSE");
return 0;
}
if (x>1.5)
{
y=exp(3*x+1);
cout << "Vrednost funkcije je: " << y <<endl;
system("PAUSE");
return 0;
}
}