Advertisement
yarik2803

Untitled

Oct 12th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. using System;
  2.  
  3. public class Test
  4. {
  5.     public static void Main()
  6.     {
  7.         double x = double.Parse(Console.ReadLine());
  8.         double y = 1;
  9.         if(x < -4){
  10.             y = 2 * x + 1;
  11.         }
  12.         if(x >= -4 && x <= 5){
  13.             y = Math.Sqrt((x * x) + 3);
  14.         }
  15.         else{
  16.             y = x / ((2 * x) + 1);
  17.         }
  18.         Console.WriteLine(y);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement