FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Crash-Course/Task/Task6.java at master · sundramsinghdev007/Java-Crash-Course · GitHub
sundramsinghdev007
/
Java-Crash-Course
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Crash-Course
/
Task
/
Task6.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (36 loc) · 1.07 KB
Breadcrumbs
Java-Crash-Course
/
Task
/
Task6.java
Copy path
File metadata and controls
36 lines (36 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*Write a Java program to accept a coordinate point in a XY
coordinate system and determine its quadrant.
*/
import
java
.
util
.*;
class
Quardent
{
public
static
void
main
(
String
...
args
)
{
Scanner
s
=
new
Scanner
(
System
.
in
);
long
X
,
Y
;
System
.
out
.
print
(
"Enter the value of Abscissa (X)="
);
X
=
s
.
nextLong
();
System
.
out
.
print
(
"Enter the value of Ordinate (Y)="
);
Y
=
s
.
nextLong
();
if
(
X
>
0
&&
Y
>
0
)
{
System
.
out
.
print
(
"Cordinate belong in First Cordinate"
+
"("
+
X
+
","
+
Y
+
")"
);
}
else
if
(
X
<
0
&&
Y
>
0
)
{
System
.
out
.
print
(
"Cordinate belong in 4th Cordinate"
+
"("
+
X
+
","
+
Y
+
")"
);
}
else
if
(
X
>
0
&&
Y
<
0
)
{
System
.
out
.
print
(
"Cordinate belong in 2nd Cordinate"
+
"("
+
X
+
","
+
Y
+
")"
);
}
else
if
(
X
<
0
&&
Y
<
0
)
{
System
.
out
.
print
(
"Cordinate belong in 3rd Cordinate"
);
}
else
{
System
.
out
.
print
(
"Cordinate present at origin"
+
"("
+
X
+
","
+
Y
+
")"
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL