Program.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace testing
  7. {
  8. internal class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. FunctionsMath fm = new FunctionsMath();
  13. Console.Write("Введите число: ");
  14. double number = Convert.ToDouble(Console.ReadLine());
  15. double result = 0;
  16. if (number == 1 || number == 0)
  17. {
  18. Console.WriteLine("Переделывай");
  19. }
  20. else
  21. {
  22. try
  23. {
  24. if (number <= 0)
  25. result = ((((FunctionsMath.Trigonometry.cot(number) / FunctionsMath.Trigonometry.sec(number)) - FunctionsMath.Trigonometry.tg(number)) * Math.Sin(number)) / FunctionsMath.Trigonometry.cos(number)) * (fm.pow(((Math.Sin(number) + FunctionsMath.Trigonometry.cos(number)) + FunctionsMath.Trigonometry.cos(number)), 2));
  26. else
  27. result = ((((fm.pow(FunctionsMath.Logarifms.log(5, number), 3)) * FunctionsMath.Logarifms.log(10, number)) + FunctionsMath.Logarifms.log(3, number)) / Math.Log(number)) + (Math.Log(number) * FunctionsMath.Logarifms.log(5, number));
  28. }
  29. catch (Exception ex)
  30. {
  31. Console.WriteLine(ex.ToString());
  32. }
  33. }
  34. Console.WriteLine(result);
  35. Console.ReadKey();
  36. }
  37. }
  38. }