-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA3Q7.java
46 lines (42 loc) · 1.15 KB
/
A3Q7.java
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
34
35
36
37
38
39
40
41
42
43
44
45
46
package ASSIGNMENT_3;
import java.util.Scanner;
public class A3Q7 {
public static void main(String[] args)
{
Scanner sc= new Scanner(System.in);
double x,y;
System.out.println("Enter the value of x");
x=sc.nextDouble();
System.out.println("Enter the value of y");
y=sc.nextDouble();
if(x>0 && y>0)
{
System.out.println("( "+x+", "+y+" )lies in 1st Quadrant");
}
else if(x<0 && y>0)
{
System.out.println("( "+x+", "+y+" ) lies in 2nd Quadrant");
}
else if(x<0 && y<0)
{
System.out.println("( "+x+", "+y+" ) lies in 3rd Quadrant");
}
else if (x>0 && y<0)
{
System.out.println("( "+x+", "+y+" ) lies in 4th Quadrant");
}
else if (x==0 && y==0)
{
System.out.println("( "+x+", "+y+" ) lies on origin");
}
else if (x==0)
{
System.out.println("( "+x+", "+y+" ) lies on Y-axis");
}
else if (y==0)
{
System.out.println("( "+x+", "+y+") lies on X-axis");
}
System.out.println("something new came");
}
}