Загрузка данных


using System;

class Program
{
    static void Main()
    {
        Console.Write("Введите a: ");
        double a = double.Parse(Console.ReadLine());

        Console.Write("Введите b: ");
        double b = double.Parse(Console.ReadLine());

        Console.Write("Введите h: ");
        double h = double.Parse(Console.ReadLine());

        Console.WriteLine("x\tF(x)");

        for (double x = a; x <= b + 1e-9; x += h)
        {
            double fx = -Math.Cos(2 * x);
            Console.WriteLine($"{x}\t{fx}");
        }

        Console.ReadKey();
    }
}