TOPIC

Wrong Answer (100%)

jp_mouraa asked 2 years ago

import java.io.IOException; import java.util.Scanner;

public class Main { public static void main(String [] args) throws IOException { Float x; Float y;

    Scanner calc = new Scanner(System.in);
    x = calc.nextFloat();
    y = calc.nextFloat();
    Scanner close;

    if(x > 0.0 && y > 0.0)
    {
       System.out.println("Q1"); 
    }
    if(x > 0.0 && y < 0.0)
    {
       System.out.println("Q4"); 
    }
    if(x < 0.0 && y > 0.0)
    {
       System.out.println("Q2"); 
    }
    if(x < 0.0 && y < 0.0)
    {
       System.out.println("Q3"); 
    }
    if(x == 0.0 && y == 0.0)
    {
       System.out.println("Origem");
    }
    if(x == 0.00 && y != 0.0)
    {
       System.out.println("Eixo X");
    }
    if(y == 0.00 && x != 0.0)
    {
       System.out.println("Eixo Y");
    }
}

}

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

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