Advertisement
Guest User

var19

a guest
Apr 9th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace var19
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double z1, z2, a;
  14.             Console.Write("a = ");
  15.             a = Convert.ToDouble(Console.ReadLine());
  16.             if ((a == 0) || (a == -2) || (a == 2)) Console.WriteLine("Error!");
  17.             else
  18.             {
  19.                 z1 = Math.Pow((((1 + a + a*a)/(2*a + a*a)) + 2 - ((1 - a + a*a)/(2*a -a*a))), -1) * (5 - 2*a*a);
  20.                 z2 = (4 - a*a)/2;
  21.                 Console.WriteLine("z1 = {0}\nz2 = {1}", z1, z2);
  22.             }
  23.  
  24.             Console.ReadKey();
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement