Your proposed example will do the job in a fairly straightforward way if you measure angles in degrees.
If you are working in radians, which is the usual convention in mathematics unless one says otherwise, it can be done. But we need to find out quite a lot about how sine and cosine behave at the integers. Not easy! Replacing the $n$ in $\sin n$ and $\cos n$ by $\frac{\pi n}{2}$ will work.
There are simpler examples that disprove the assertion. We can let $f(n)=0$ when $n$ is even, $f(n)=1$ when $n$ is odd, and let $g(n)=1-f(n)$.
Or for an example that is slightly more realistic in a computing context, let $f(n)=n$ when $n$ is even, $f(n)=n^2$ when $n$ is odd, and let $g(n)=n^2$ when $n$ is even, $g(n)=n$ when $n$ is odd.