HI everyone,
i need to enter all those values and add them up.
but have some trouble storing numbers to a array list.
plz help~~!
[import java.util.*;
public class array
{ public static void main (String []args)
{
Scanner sc= new Scanner (System.in);
int value;
System.out.print("How many values are in the data set?");
value=sc.nextInt();
for (int i=1; i<= value; i++)
{
int num;
System.out.print("Please enter value "+i+":");
num=sc.nextInt();
}
// store numbers to an array
}
}]