int [] x = new int[10];
int k = 0;
while(K < 10) {
x[k] = k*k;
k++;
}
for (int j = 0; j<10;j++) {
System.out.println(j+ " squared is " + x[j]);
}
Look at the left of the source code window where the line numbers are,
do you see a lightbulb with a red circle? Point your mouse at the
lightbulb without clicking. You should get a pop up box telling you
that thae variable K is unknown. Errors will be indicated as you type
there in the left column. Go ahead and fix that now.
Scanner in = new Scanner(System.in);
System.out.print("Please input an integer ");
int n = in.nextInt();
System.out.print("Please input a seond integer ");
int k = in.nextInt();
System.out.println("The two ints were " + n + " and " + k);