Create and print a 2D Times Tables with variables Rows, Cols with Exponent
-
For instance you could create a 3x4 times table with exponent 1 like so:
-
A 5x6 times table with exponent 3 would look like this:
- Fork this repository.
- Open a new sketch in Processing on your laptop and name it
times_tables - Create a public class TTE in a separate java tab
- Add one method
public static <type goes here> ttexp()that takes in 3 int parametersrows_, cols_, exp_ - create and return a 2D array from this method with values like the ones shown above
- Use 2
nested for loopsto do this.
- Add one method
- Ensure that the main tab in processing has the name
times_tables.- Create int global variables
rows, cols, expand assign some initial values. - Create a global 2D array named
ttof typelong. Do not initialize it here! - In
setup()call the static methodttexp()in classTTEand assign the returned value tott. - Write a function
print_ttexp(). Inside this function, use twoenhanced nested for loopsto print the resulting times tables as shown above.
- Create int global variables
- Test with various values of rows, cols, and exponent.
- Upload the
times_tables.pdeandTTE.javato your forked repositoryttexpon Github & Commit.
Grades will be assigned for 2 categories equally weighted:
- Following the instructions above STRICTLY!!
- Correct numerical results for various rows, cols, exponent as shown above
- Code should be written following proper naming/coding standards and best practices. Results should be properly formatted to look like a table.

