array troubles
My assignment for this week is create a program, which uses arrays, that accepts a series of numbers and then prints each number followed by a string of * characters equal to the number.
Here is a sample of the program:
> Enter the length of the series: 5
> Enter number 1: 4
> Enter number 2: 2
> Enter number 3: 7
> Enter number 4: 1
> Enter number 5: 9
>
> 4 ****
> 2 **
> 7 *******
> 1 *
> 9 *********
Here is what i have so far...
import java.util.*;
publicclass TextGraph{
publicstaticvoid main(String[] args){
Scanner keyboard =new Scanner(System.in);
System.out.print("Enter the length of the series: ");
int series = keyboard.nextInt();
int[] input =newint[series];
for (int i = 0; i < series; i++){
System.out.print("Enter number: ");
input[i] = keyboard.nextInt();
}
for (int i = 0; i < input[i]; i++){
System.out.println(input[i] +"* ");
}
}
}
I just cant seem to figure out how to print the '*' equal to the value inputed. Can someone give me any tips or lead me in the right direction to solving this?

