ГОСТ Р ИСО/МЭК 10373-6—2015
Char *Inpu».FiLeNair.e Input.tJtt*’;
in*.SampledPolnts-0;
int N;
in*, tow;
cons*. tnt col-2;
tnL ReadCats(void)
l
float a,b;
int i-O.-
FILE *fpl;
i-O;
SampledPointa-O; //IA
it ((Cpl - Copen(InputFileName,"r")) — NULL)
1
printr("Cannot open input flle.\n");
return 1;
I
while(!teoi(Cpl>)
f
scan!(tpl,"•e,:%e\n",
йа,
abb
ot-eve!SampledPo-nts - a;
Svalue SampledEo-nts’ - b;
SaR.p’ledPoints-•;
it (SampledPomts;*- MAXFOINT) brea.<;
tclose(tpl);
tpl-topen ("inputfile.txt","w");
it (!tpl)
<
tpr-ntt(stdout,"Can’t wr.te the sampled data an inputflle.txt. \n");
return
1
;
i
Cot(i-0; KSampledPomta; l-»-*)
Cprintt(Cpl,"4e\n",Gvalueil)); /*Gtime|i| has been omitted*/
Cclose(tpl);
if(aebug)
tpl-topen(".nputt-me.txt","и");
-t CCpll
»
fprir.tf(stdout,"Can’t write the sampled data in inputtime.txt. \n")
Eetv.cn 1;
i
lor(i-0; -<,Sampledfo-nts; -•♦)
tpr-ntr(tpl,"*-e\n"’,GtiK^ i.-J; /«Gt-me!.; has been oe-tted»/
tc.ose(fpl);
it(aebug)
56
-I((fpl-lopen("inputflle.bin","wb’l)!-NULL)
*
fw rite(G valu e, s lz e o l (double), SaippledPoint.
3
, f p l ) ;
l c l o s e ( f p l ) ;
)