public static void Main()
Console.WriteLine("Task 3");
double x = 0.5, a = 4.3, y = 2.6, d = 0.3, v = 0;
Console.Write("Input n - ");
int n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Case {0}", n);
v = 1.5 * x + 9 * Math.Pow(x, 2) + 1.25;
Console.WriteLine("Case {0}", n);
Console.WriteLine("Case {0}", n);
Console.WriteLine("Default case with number {0}", n);
Console.WriteLine("Output v - {0}", v);
private static void t2(){
Console.WriteLine("Task 2");
Console.Write("Input n - ");
double n = Convert.ToDouble(Console.ReadLine());
Console.Write("Input x - ");
double x = Convert.ToDouble(Console.ReadLine());
double sumOfElements = 0;
for (int i = 1; i <= n; i++){
sumOfElements += (x + Math.Cos(i * x)) / Math.Pow(2, i);
Console.WriteLine("Output sumOfElements - {0}", sumOfElements);
private static void t1(){
Console.WriteLine("Task 1");
Console.Write("Input x - ");
double x = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("x >= 0");
x = Math.Sqrt(Math.Pow(x, 3) + 5);
else if (-3 < x && x < 0){
Console.WriteLine("-3 < x < 0");
x = 3 * Math.Pow(x, 4) + 9;
Console.WriteLine("Output x - {0}", x);