c++ program to draw horizontal or vertical sine wave