/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
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace test
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal x = decimal.Parse(Console.ReadLine());
- decimal y = decimal.Parse(Console.ReadLine());
- if (x == 0 && y == 0)
- {
- Console.WriteLine(0);
- }
- else if (x > 0 && y > 0)
- {
- Console.WriteLine(1);
- }
- else if (x < 0 && y > 0)
- {
- Console.WriteLine(2);
- }
- else if (x < 0 && y < 0)
- {
- Console.WriteLine(3);
- }
- else if (x > 0 && y < 0)
- {
- Console.WriteLine(4);
- }
- else if (x == 0)
- {
- Console.WriteLine(5);
- }
- else if (y == 0)
- {
- Console.WriteLine(6);
- }
- }
- }
- }