wonder if you can help, im trying to compile this piece of code..
im getting the following errors:
int n, r;
double s, spike;
n = 0
r = rand()*40/RAND_MAX + 10;
while (scanf ("%lg", &s) !=EOF)
if (n == r)
spike = (double)rand() *30.0 / RAND_MAX - 15.0;
printf ("%lg\n", spike);
n = 0;
r= rand()*40/RAND_MAX + 10;
n = n+1;
line 12: error 1000: unexpected symbol: "r"
line 30: error 1000: unexpected symbol: "n"
error 1764: declarations as statements only with ansi_extend option.
its probably a really easy problem to fix but im very new to C!
any help appreciated