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 ((2*0.01*Math.Log(x))/(x));
- }
- static double g(double x)
- {
- return (x/(x*x - 4*x + 5));
- }
- 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\tf(x)\t\t\tg(x)");
- for (double i = a; i <= b; i += h)
- {
- Console.WriteLine("{0}\t{1}\t{2}", i, f(i), g(i));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement