I am using OpenGL in C++ language and Visual Studio 2013 as my IDE

Consider the function sin(pi*x/pi)

ranging from x=-4 to +4

i have the following code