[ create a new paste ] login | about

Link: http://codepad.org/9kHPbr1S    [ raw code | output | fork ]

C, pasted on Oct 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <math.h>
#define V 60
#define N 12
#define EPSILON 0.001
int main() {
  double rad;
  int i, n;
  for (rad = 0.0; rad <= 2.0 * M_PI + EPSILON; rad += M_PI / N) {
    n = V / 2 + (int)(sin(rad) * V / 2.0);
    for (i = 0; i < n; i++)
      putchar(' ');
    printf("*\n");
  }
  return 0;
}
/* end */


Output:
1
2
In function `main':
undefined reference to `sin'


Create a new paste based on this one


Comments: