Class1.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ClassificationOnLevelDetalization
  7. {
  8. public class Class1
  9. {
  10. public double GetCos(double x)
  11. {
  12. double myCos;
  13. myCos = Math.Sqrt(1 - Math.Sin(x)*Math.Sin(x));
  14. return myCos;
  15. }
  16. public double DriverGetCos(double x)
  17. {
  18. double myCos;
  19. myCos = GetCos(x);
  20. Console.Write("\nДрайвер косинуса: "+ myCos);
  21. return myCos;
  22. }
  23. public double GetSec(double x)
  24. {
  25. double mySec;
  26. mySec = 1/GetCos(x);
  27. return mySec;
  28. }
  29. public double DriverGetSec(double x)
  30. {
  31. double mySec;
  32. mySec = GetSec(x);
  33. Console.Write("\nДрайвер сек: " + mySec);
  34. return mySec;
  35. }
  36. public double GetTan(double x)
  37. {
  38. double myTan;
  39. myTan = Math.Sin(x) / GetCos(x);
  40. return myTan;
  41. }
  42. public double DriverGetTan(double x)
  43. {
  44. double myTan;
  45. myTan = GetTan(x);
  46. Console.Write("\nДрайвер тан: " + myTan);
  47. return myTan;
  48. }
  49. public double GetCot(double x)
  50. {
  51. double myCot;
  52. myCot = GetCos(x) / Math.Sin(x);
  53. return myCot;
  54. }
  55. public double DriverGetCot(double x)
  56. {
  57. double myCot;
  58. myCot = GetCot(x);
  59. Console.Write("\nДрайвер котангес: " + myCot);
  60. return myCot;
  61. }
  62. public double GetLog(int a, double x)
  63. {
  64. double myLog;
  65. if(a != 1 && a > 0)
  66. {
  67. myLog = Math.Log(x) / Math.Log(a);
  68. return myLog;
  69. }
  70. else
  71. {
  72. Console.WriteLine("Неверный данные");
  73. return -111111111;
  74. }
  75. }
  76. public double DriverGetLog(int a, double x)
  77. {
  78. double myLog;
  79. myLog = GetLog(a,x);
  80. Console.Write("\nДрайвер логарифм: " + myLog);
  81. return myLog;
  82. }
  83. public double First(double x)
  84. {
  85. double result;
  86. result = ((((GetCot(x) / GetSec(x)) - GetTan(x) ) * Math.Sin(x)) / GetCos(x)) * (((Math.Sin(x) + GetCos(x)) + GetCos(x)) * ((Math.Sin(x) + GetCos(x)) + GetCos(x)));
  87. return result;
  88. }
  89. public double DriverFirst(double x)
  90. {
  91. double result;
  92. result = First(x);
  93. Console.Write("\nДрайвер результата первого: " + result);
  94. return result;
  95. }
  96. public double Second(double x)
  97. {
  98. double result;
  99. result = ((((GetLog(5, x) * GetLog(5, x) * GetLog(5, x)) * GetLog(10, x)) + GetLog(3, x)) / Math.Log(x)) + (Math.Log(x) * GetLog(5, x));
  100. return result;
  101. }
  102. public double DriverSecond(double x)
  103. {
  104. double result;
  105. result = Second(x);
  106. Console.Write("\nДрайвер результата второго: " + result);
  107. return result;
  108. }
  109. }
  110. }