Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lab-dastoorkar1
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
9931099
lab-dastoorkar1
Commits
63bcbba8
Commit
63bcbba8
authored
Mar 07, 2021
by
9931099
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit
parents
Pipeline
#5801
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
Main.java
Main.java
+64
-0
No files found.
Main.java
0 → 100644
View file @
63bcbba8
package
com
.
company
;
import
java.util.Scanner
;
import
javax.swing.JOptionPane
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
// write your code here
//first program____nesbat beham avval
Scanner
scanner
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"enter first integer:"
);
int
x1
=
scanner
.
nextInt
();
System
.
out
.
println
(
"enter second integer:"
);
int
x2
=
scanner
.
nextInt
();
while
(
x1
!=
x2
)
{
if
(
x1
>
x2
)
x1
=
x1
-
x2
;
else
x2
=
x2
-
x1
;
}
if
(
x2
==
1
)
System
.
out
.
println
(
"nesbat be ham avval"
);
else
System
.
out
.
println
(
"nesbat be ham gheir avval"
);
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
//second program______ 10x10 jadval
for
(
int
i
=
0
;
i
<
11
;
i
++)
{
for
(
int
j
=
0
;
j
<
11
;
j
++)
{
if
((
i
==
0
)&&(
j
==
0
))
{
System
.
out
.
print
(
"*\t"
);
}
else
if
(
i
==
0
)
System
.
out
.
print
(
j
+
"\t"
);
else
if
(
j
==
0
)
System
.
out
.
print
(
i
+
"\t"
);
else
System
.
out
.
print
((
i
*
j
)+
"\t"
);
}
System
.
out
.
print
(
"\n"
);
}
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
//3rd program
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
char
s
:
args
[
i
].
toCharArray
())
{
System
.
out
.
println
(
s
);
}
}
}
}
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