#include <stdio.h>

#include <string.h>

 

void main (void)

{

int n,i;

float a,b;

FILE *kazdat;

kazdat=fopen("krivulja.txt","w");

// OS vrtenja

printf("%s","Prva tocka osi (X, Y): ");

scanf("%f%f",&a,&b);

fprintf(kazdat,"%f %f\n",a,b);

printf("%s","Druga tocka osi (X, Y): ");

scanf("%f%f",&a,&b);

fprintf(kazdat,"%f %f\n",a,b);

// Kot zavrtitve

printf("%s","Kot zavrtitve vrtenine (stopinj): ");

scanf("%f",&a);

fprintf(kazdat,"%f\n",a);

// Delitev

printf("%s","Stevilo delitev: ");

scanf("%d",&n);

fprintf(kazdat,"%d\n",n);

// Stevilo tock

printf("%s","Stevilo tock: ");

scanf("%d",&n);

fprintf(kazdat,"%d\n",n);

// Krivulja podana s crtami

for (i=0;i<n;i++)

{

printf("%s %d%s","Koordinate",i+1,". tocke (X,Y): ");

scanf("%f%f",&a,&b);

fprintf(kazdat,"%f %f\n",a,b);

}

// Zakljucek datoteke:

fclose(kazdat);

}