JAVA--纠错,谢谢各位

来源:百度知道 编辑:UC知道 时间:2024/06/05 15:06:18
//Write a program that determines in which quadrant of a Cartesian coordinate system a given point (x,y) lies.

import java.util.Scanner;
public class Coordinate{
public static void main(String[] args){
Scanner keyboard=new Scanner(Syetem.in);
System.out.print("Enter a value of x on the coordiante system [integer]:");
int x=keyboard.nextInt();
System.out.print("Enter a value of y on the coordiante system [integer]:");
int y=keyboard.nextInt();

//start doing the loops
if ( x>0; y>0 )
{
System.out.println("The point (x = "+x+",y = "+y+" is placed in the upper, right quadrant.");
}
if (x>0, y<0){
System.out.println("The point (x = "+x+",y = "+y+" is placed in the lower, right quadrant.");
}
if (x<0, y>0){
System.out.pr

import java.util.Scanner;

public class Coordinate {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
System.out
.print("Enter a value of x on the coordiante system [integer]:");
int x = keyboard.nextInt();
System.out
.print("Enter a value of y on the coordiante system [integer]:");
int y = keyboard.nextInt();

// start doing the loops
if (x > 0 || y > 0) {
System.out.println("The point (x = " + x + ",y = " + y
+ " is placed in the upper, right quadrant.");
}
if (x > 0 || y < 0) {
System.out.println("The point (x = " + x + ",y = " + y
+ " is placed in the lower, right quadrant.");
}
if (x < 0 || y > 0) {
System.out.println("The point (x = " + x + ",y = " + y
+ "