Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lab 1
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731001
Lab 1
Commits
c6f4eec2
Commit
c6f4eec2
authored
May 14, 2019
by
9731001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lab1
parents
Pipeline
#606
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
Main.java
Main.java
+31
-0
No files found.
Main.java
0 → 100644
View file @
c6f4eec2
import
java.util.Scanner
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
Scanner
sc
=
new
Scanner
(
System
.
in
);
int
num1
,
num2
;
System
.
out
.
println
(
"Enter the first number"
);
num1
=
sc
.
nextInt
();
System
.
out
.
println
(
"Enter the second number"
);
num2
=
sc
.
nextInt
();
int
i
,
temp
=
0
;
if
(
num1
>=
num2
){
for
(
i
=
2
;
i
<=
num2
;
i
++){
if
(
num2
%
i
==
0
&&
num1
%
i
==
0
)
temp
++;
}
}
if
(
num2
>
num1
){
for
(
i
=
2
;
i
<=
num1
;
i
++){
if
(
num1
%
i
==
0
&&
num2
%
i
==
0
)
temp
++;
}
}
if
(
temp
==
0
){
System
.
out
.
print
(
"Aval hastand"
);
}
else
System
.
out
.
print
(
"Aval nistand"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment