If ((File.Exists(b)) && (File.Exists(s)))
{
Console.Write("введите
элементы
файла\n");
for
(i = 0; i < n; i++)
{
a
= Convert.ToDouble(Console.ReadLine());
J.Write(a);
}
J.Close();
BinaryReader
F = new
BinaryReader
(File.Open(B,
FileMode.Open));
If (File.Exists(b))
{
a
= F.ReadDouble();
b
= F.ReadDouble();
c
= F.ReadDouble();
Y.Write(a);
Console.Write(a
+ "
");
for
(i = 1; i < n - 2; i++)
{
d
= (a + c) / 2.0;
Y.Write(d);
Console.Write(d
+ "
");
a
= b;
b
= c;
c
= F.ReadDouble();
}
d
= (a + c) / 2.0;
Y.Write(d);
Y.Write(c);
Console.Write(d
+ "
"
+ c);
Y.Close();
F.Close();
return;
}
}
Console.Write("File
Not Found");
}
static
void
Main(string[]
args)
{
Solo("C:\\a1.dat","C:\\a2.dat");
Console.ReadKey();
}
}
}