So I have this question: Write a program that creates a constant MULTIPLE of type int. Set MULTIPLE to 3. Output the times table between 1 and 10 for MULTIPLE. Modify the program to output the times table of 7.
And so far I've written this:
//5. - Homework
class Hw8{
public static void main (String args[]){
final double MULTIPLE = 3;
int a = 1 * 1;
int b = 2 * 1;
int c = 3 * 1;
int d = 4 * 1;
int e = 5 * 1;
int f = 6 * 1;
int g = 7 * 1;
int h = 8 * 1;
int i = 9 * 1;
int j = 10 * 1;
System.out.println(a, b, c, d, e, f, g, h, i, j);
}
}
Though I have an error in the final part can anyone point out what I did wrong?
Thanks
:)