-
Notifications
You must be signed in to change notification settings - Fork 128
/
solucao.cs
33 lines (30 loc) · 882 Bytes
/
solucao.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Globalization;
namespace Coordenadas_De_Um_Ponto
{
class Program
{
static void Main(string[] args)
{
string[] s = Console.ReadLine().Split(' ');
double X, Y;
X = double.Parse(s[0], CultureInfo.InvariantCulture);
Y = double.Parse(s[1], CultureInfo.InvariantCulture);
if ( X == 0.0 && Y == 0.0 ) {
Console.WriteLine("Origem");
} else if ( X == 0.0 ) {
Console.WriteLine("Eixo Y");
} else if ( Y == 0.0 ) {
Console.WriteLine("Eixo X");
} else if ( X > 0.0 && Y > 0.0 ) {
Console.WriteLine("Q1");
} else if ( X < 0.0 && Y > 0.0 ) {
Console.WriteLine("Q2");
} else if ( X < 0.0 && Y < 0.0 ) {
Console.WriteLine("Q3");
} else if ( X > 0.0 && Y < 0.0 ) {
Console.WriteLine("Q4");
}
}
}
}