using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO ; using System.ComponentModel; class Program { public static void Main() { string path = @"C:\\file1.txt"; using (StreamReader reader = new StreamReader(path)) { string line; while ((line = reader.ReadLine()) != null) { Console.WriteLine(line); } } StreamWriter write = new StreamWriter("C:\\file.txt"); Console.WriteLine("a1: "); var a1 = Double.Parse(Console.ReadLine()); Console.WriteLine("b1: "); var b1 = Double.Parse(Console.ReadLine()); Console.WriteLine("h1: "); var h1 = Double.Parse(Console.ReadLine()); var e1 = b1 + h1 / 10; for (var x = a1; x < e1; x += h1) { Console.WriteLine($"x = {x:F2} f(x) = {Y(x):F12}"); write.Write($"x = {x:F2} f(x) = {Y(x):F12}"); } Console.WriteLine("a2: "); var a2 = Double.Parse(Console.ReadLine()); Console.WriteLine("b2: "); var b2 = Double.Parse(Console.ReadLine()); Console.WriteLine("h2: "); var h2 = Double.Parse(Console.ReadLine()); var e2 = b2 + h2 / 10; var y = 0.0; for (var x = a2; x < e2; x += h2) { Y(x, out y); Console.WriteLine($"x = {x:F2} f(x) = {Y(x):F12}"); write.Write($"x = {x:F2} f(x) = {Y(x):F12}"); } write.Close(); } static double Y(double x) { double m = Math.Sqrt(5 * x * x + 5); if (Math.Abs(x) < 2.0) return m; if (Math.Abs(x) >= 10) return 0; return Math.Abs(x) / m; } static void Y(double x, out double y) { double m = Math.Sqrt(5 * x * x + 5); if (Math.Abs(x) < 2) { y = m; } else if (Math.Abs(x) >= 10) { y = 0; } else y = Math.Abs(x) / m; } } ВОТ ПО ЭТОЙ ФУНКЦИИ СДЕЛАТЬ ТАБЛИЦУ