Trochę źle zrozumiałeś chyba o co chodzi z sin.
http://www.cplusplus.com/reference/cmath/sin/
tej funkcji podajesz liczbę i ona zwraca Ci sinus tego kąta, dlatego też tylko dajesz sin(yy). Wtedy program sobie pomnozy yy, a potem wyśle wynik jako argument do funkcji sin, następnie, ta zwróci wynik, gotowy sin i go chcesz pomnożyć przez 3 itd.
dlatego lepiej coś w stylu:
#include <iostream>
#include <math.h>
using namespace std;
double funkcja(double y)
{
return (2*y)-3*(sin(y*y));
}
int main()
{
double x,y;
cout <<"Podaj liczbe";
cin >> y;
x = funkcja(y);
cout << "Wynik : " << x;
cin >> y; //Stop the console from closing //Edit: Error here, changed << to >>
return 0;
}
Nietestowany, ale powinien działać.