Java Question help Multiplication

Apr 30th, 2015
Price: $5 USD

Question description

public class Multiplication {
  public static void main (String[] args) {
    final int FIRST_MAX = 5;
    final int SECOND_MAX = 6;
    // Use nested for loops to print multiplications
    // for 1 through FIRST_MAX by 1 through SECOND_MAX
Your task, then, is to work in the area of the code I specify. In the main method, you will need to do the following things:
  1. Write your outer for loop, which will run for FIRST_MAX times
  2.  Write your inner for loop, which will run for SECOND_MAX times
  3.  Print a string like so: 1 * 4 = 4. (In other words, the current outer loop index, the '*' symbol, the current inner loop index, the '=' symbol, and the product of the two current indices.
  4.  Skip a line in output.
Note that, if you change the values of FIRST_MAX and SECOND_MAX, the output will look different.

Tutor Answer

(Top Tutor) Ankit P
School: Cornell University

Studypool has helped 1,244,100 students

Review from student
" Awesome! Exactly what I wanted. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1828 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors