Good day everyone.
I'm still confused on how the process/algorithm will work here:
// i've added + 1 to have an initial value of 1 (?)
// <confused>
int aiNumbers[][] = new int[Integer.parseInt(args[0])+ 1]
[Integer.parseInt(args[1]) + 1];
// <confused>
if(args[0].equals("0") || args[1].equals("0")) {
System.out.println("0");
}
else {
// <confused> sorry, im a newbie.
for(int iCtr=1;iCtr < aiNumbers.length; iCtr++) {
for(int iCtr2=1;iCtr2 < aiNumbers[iCtr].length; iCtr2++) {
aiNumbers[iCtr][iCtr2] = iCtr * iCtr2;
System.out.print(aiNumbers[iCtr][iCtr2] + " ");
}
System.out.println("");
}
}
Sorry Eranga. I still don't know how the process start and I don't even know how should I describe the process.
Would someone help me on making good algorithm statements here?
By the way, this code allows two arguments to be inputted by user to display like a 'multiplication table' depends on the 2 inputs.
Here I used multidimensional arrays.
I've tried simplier codes without arrays. But we are required to do it in a array.
