Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 4a20b41

Browse files
authored
Create arrayGenerator.java
1 parent 0ee312e commit 4a20b41

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

arrayGenerator.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
public class arrayGenerator
2+
{
3+
public void main(String[] args)
4+
{
5+
//Config
6+
int size = 10;
7+
//Generate It
8+
a = arrayGen(size);
9+
}
10+
//Creates an array of the specifed size
11+
public int[] arrayGen(int size)
12+
{
13+
int[] a = new int[size];
14+
for(int i = 0; i < 3; i++)
15+
{
16+
a[i] = readInt("Input a number: ");
17+
}
18+
return a;
19+
}
20+
}

0 commit comments

Comments
 (0)