Для формулы на картинке...
using System;
namespace Answer {
class Program {
static void Main() {
Console.Write("Введите a: ");
var a = double.Parse(Console.ReadLine());
Console.Write("Введите b: ");
var b = double.Parse(Console.ReadLine());
Console.Write("Введите h: ");
var h = double.Parse(Console.ReadLine());
for (var x = a; x <= b + h / 2; x += h) {
if (Math.Abs(x) < 1e-15) x = 0;
var y = Math.Pow(x, 2) * Math.Pow(Math.Sin(x), 2) + 1;
Console.WriteLine($"F({x:N2}) = {y:N6}");
}
Console.ReadKey();
}
}
}
namespace aaa
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введите h");
double h = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Введите x");
double x = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Введите a");
double a = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Введите b");
double b = Convert.ToDouble(Console.ReadLine());
if (x > a && x < b)
{
for (x > a && x < b; x = x + h)
{
Console.WriteLine($"X = {x}");
Console.WriteLine($"Значение функции при х = {x}" + Math.Pow(x,2)*Math.Pow(Math.Sin,2)*x + 1);
}
}
else
{
Console.WriteLine($"X = {x} находится вне отрезка [{a},{b}]");
}
}
}
}