Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static double f(double x)
- {
- return Math.Pow(Math.E, x);
- }
- static double g(double x)
- {
- return 2.5*(Math.Log(1 + x*x));
- }
- static void Main(string[] args)
- {
- 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("\nProgram output:\nx");
- for (double i = a; i <= b; i += h)
- {
- if(f(i) > g(i)) Console.WriteLine(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement