Advertisement
Shokedbrain

vova variant 11

Mar 26th, 2022
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace vova_task1
  4. {
  5.     class Program
  6.     {
  7.  
  8.         static double GradToRad(double val)
  9.         {
  10.             return Math.PI * val / 180.0;
  11.         }
  12.         static void Main(string[] args)
  13.         {
  14.             double z1, z2, alpha;
  15.             Console.Write("enter alpha: ");
  16.             alpha = double.Parse(Console.ReadLine());
  17.             alpha = GradToRad(alpha);
  18.             z1 = (1 - 2*Math.Pow(Math.Sin(alpha),2)) / (1 + Math.Sin(2*alpha));
  19.             z2 = (1 - Math.Tan(alpha)) / (1 + Math.Tan(alpha));
  20.             Console.WriteLine($"{z1:F5} {z2:F5}");
  21.             Console.ReadKey();
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement