TOPIC

Wrong answer 100%

ManyZdebski asked 2 years ago

qual o problema?

using System;

class URI {

static void Main(string[] args) { 

string value = Console.ReadLine();
string[] values = value.Split(' ');

float x = float.Parse(values[0]);
float y = float.Parse(values[1]);
string result = "";

if(x == 0 & y == 0)
{
    result = "Origem";
}
if(x == 0 & y != 0)
{
    result = "Eixo X";
}
if(y == 0 & x != 0)
{
    result = "Eixo Y";
}
if(x > 0 & y > 0)
{
    result = "Q1";
}
if(x < 0 & y > 0)
{
    result = "Q2";
}
if(x < 0 & x < 0)
{
    result = "Q3";
}
if(x > 0 & y < 0)
{
    result = "Q4";
}

 Console.WriteLine(result);

}

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.