PageRenderTime 1ms CodeModel.GetById 72ms app.highlight 2ms RepoModel.GetById 9ms app.codeStats 1ms

/Programing/C#/Exams/Simple Exame 2011/test/Problem 1 – Cartesian Coordinate System.cs

https://github.com/AssiNET/TelerikHomework
C# | 50 lines | 44 code | 6 blank | 0 comment | 22 complexity | a751f1a8ed99591c8a9a375fd0a581e3 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using System.Threading.Tasks;
 6
 7namespace test
 8{
 9    class Program
10    {
11        static void Main(string[] args)
12        {
13            decimal x = decimal.Parse(Console.ReadLine());
14            decimal y = decimal.Parse(Console.ReadLine());
15            if (x == 0 && y == 0)
16            {
17                Console.WriteLine(0);
18            }
19            else if (x > 0 && y > 0)
20            {
21                Console.WriteLine(1);
22            }
23            else if (x < 0 && y > 0)
24            {
25                Console.WriteLine(2);
26            }
27            else if (x < 0 && y < 0)
28            {
29                Console.WriteLine(3);
30            }
31            else if (x > 0 && y < 0)
32            {
33                Console.WriteLine(4);
34            }
35            else if (x == 0)
36            {
37                Console.WriteLine(5);
38            }
39            else if (y == 0)
40            {
41                Console.WriteLine(6);
42            }
43
44
45
46
47
48        }
49    }
50}