I wrote a program to calculate the sum of a harmonic series (1 + 1/2 + 1/3 .. + 1/n), but I'm having trouble compiling it. I went over the code a bunch of times but I don't see any syntax errors [2 are showing up when I try to compile]. Is my logic wrong, or is it syntactical? 

```
#include <stdio.h>
int main( void ) {

 int v,p,i;
 double x=0;

 printf("Enter a value to calculate the value of this harmonic series: \n");
 scanf("%d",&v);

 if (v<=0) {
   printf("Please enter a POSITIVE number: \n");
   scanf("%d",&p);
   while (i=1; i<=v; i++) {
     x=x+(1/i);  }
     printf("The value for the series is %lf", x);
  }
    else {
      while (i=1; i<=v; i++) {
        x=x+(1/i);
      }
      printf("The value for the series is %lf", x);
    }
  return 0;
}

```

Thanks for any help