I have the following code which should output the character image of a sine curve:

```
#include <stdio.h>
#include <math.h>

/**show the image of sine curve*/
main()
{
    double y;
    int m, x;
    for (y = 1; y >= 0; y -= 0.1) {
        m = asin(y) * 10;
        for (x = 1; x < m; x++)
            printf(" ");
        printf("*");
        for (; x < 31 - m; x++)
            printf(" ");
        printf("*\n");
    }
    for (y = 0; y <= 1; y += 0.1) {
        m = 31 + asin(y) * 10;
        for (x = 1; x < m; x++)
            printf(" ");
        printf("*");
        for (; x < 93 - m; x++)
            printf(" ");
        printf("*\n");
    }
}

```

This is the output it generates:

```

              * *
          *         *
        *             *
      *                 *
     *                   *
    *                     *
   *                       *
  *                         *
 *                           *
*                             *
*                              *
                              *                               *
                               *                             *
                                *                           *
                                 *                         *
                                  *                       *
                                   *                     *
                                    *                   *
                                     *                 *
                                       *             *
                                         *         *
                                             * *

```

As you can see, my code's result is not continuous. I want to know where my code is incorrect. And on the other hand, I would appreciate it if someone could give me a better solution.