My assignment was to divide 2 pi by 100 and take the cos of each value and put them into an array, I don't know why I am having errors but when i run the program i get weird symbols.
public class Array1D { public static void main(String[] args) { double [] array = new double[101]; for(int i=0; i<100;i++){ double a = (Math.PI/100.0)*i; double b = Math.cos(a); array[i]=b; System.out.println(array); } } }