Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
automatic-test
Overview
Overview
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
钟涨钱
automatic-test
Commits
72f1b783
Commit
72f1b783
authored
Oct 12, 2021
by
朽木不可雕也
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
d68de549
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
38 deletions
+0
-38
barrage-crawler-server/src/test/java/demo/RandmoDemo.java
+0
-38
No files found.
barrage-crawler-server/src/test/java/demo/RandmoDemo.java
deleted
100644 → 0
View file @
d68de549
package
demo
;
import
org.junit.jupiter.api.Test
;
/**
* @author aszswaz
* @createTime 2021-08-25 18:08:23
* @ide IntelliJ IDEA
*/
@SuppressWarnings
(
"JavaDoc"
)
class
RandmoDemo
{
/**
* 随机 0 - 5 之间的数字
*/
@Test
void
randmo01
()
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
double
randmo
=
Math
.
random
();
System
.
out
.
println
(
randmo
);
System
.
out
.
println
(
randmo
*
5
);
System
.
out
.
println
(
"============================"
);
}
}
/**
* 随机 5 - 10 之间的数字
*/
@Test
void
randmo02
()
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
double
randmo
=
Math
.
random
();
System
.
out
.
println
(
randmo
);
// + 1 表示需要包括 10
System
.
out
.
println
(
5
+
randmo
*
(
10
-
5
+
1
));
System
.
out
.
println
(
"============================"
);
}
}
}
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