Advertisement
Batisk_AFF

tail-5

Oct 16th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static double f(double x)
  12.         {
  13.             return Math.Pow(Math.E, x);
  14.         }
  15.  
  16.         static double g(double x)
  17.         {
  18.             return 2.5*(Math.Log(1 + x*x));
  19.         }
  20.  
  21.         static void Main(string[] args)
  22.         {
  23.             Console.Write("a = ");
  24.             double a = Double.Parse(Console.ReadLine());
  25.             Console.Write("b = ");
  26.             double b = Double.Parse(Console.ReadLine());
  27.             Console.Write("h = ");
  28.             double h = Double.Parse(Console.ReadLine());
  29.             Console.WriteLine("\nProgram output:\nx");
  30.             for (double i = a; i <= b; i += h)
  31.             {
  32.                 if(f(i) > g(i)) Console.WriteLine(i);
  33.             }
  34.         }
  35.     }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement