Code:
#include<stdlib.h>
 #include<stdio.h>
FILE *fp;


 int func_1(int n,double w[],double v[])
  {   int i;
    fp=fopen("in.txt","w+");

    if(fp==NULL) write("can't open");
    return 13;
    
    for(i=0;i<n-1;i++)
    { putchar(w[i]); putchar(v[i]);}

return 7;
    }


void main()
{

  int N,i;
  char z;
  double *oX,*oY;


 printf("what would you like to do now?\n");
 scanf("%s",&z);

switch (z)
{case 'add': printf("\n enter: 1)number of points you wish to add 2)coordinates of points ");
scanf("%d",&N);
oX=(double*)malloc(N*sizeof(double));
oY= (double*)malloc(N*sizeof(double));
for(i=0;i<N-1;i++)
{scanf("%d%d",&oX[i],&oY[i]);printf("\n");i++;}
 func_1(N,oX,oY);
   break;

 case 'q' :break;}
// getchar();
// getchar();
 }