java - Beginner on matrix and its rows -


I have made a problem to solve with arrays and matrix I understand how it works but The following questions were found about the rows. This is the problem that the problem tells me to do:

a. Write the definition of method inputArray which prompts the user to input 20 points and stores numbers in alpha.

Repeat the definition of the law, which initiates the elements of beta twice the same elements in alpha. Make sure that you stop the method by modifying the elements of alpha.

c Write the definition of Gamma to the copy of the method which sets the elements of the first line of gamma and the remaining rows of the infocus up to three times in the previous lines of the instock from the infoco. Make sure that you stop the method by modifying the elements of gamma.

This is what I did:

code
  public class array queries {public static zero main (string [] args) {Int count = 0; Int [] [] INSTOCK = new int [10] [14]; Int [] alpha = new int [20]; Int [] beta = new int [20]; Int [] Gamma = {11, 13, 15, 17}; Int [] Delta = {3, 5, 2, 6, 10, 9, 7, 11, 1, 8}; Alpha (alpha, count); Beta (beta, count, alpha); CopyGamma (instock, gamma, count); } Public static integer alpha (integer alpha [], integer number) {count = 0; System.out.println ("Enter 20 Number:"); For (int i = 0; i   

Output does not give any error and I have not yet created another method for output, because I have to make sure that the copy gumma is correct when it means that the input The first line is the first of the matrix [] and for the rest it means only the remaining lines of the instock? Since there are 5 elements in gamma, the stok rows are left from 5. Does it mean that I multiply by 3 or whole matrix? If I am right [i] = rows and [j] columns? I'm confused there.

This is the correct i rows, j Column however, it seems that you are assigning gamma [i] to the value of inStock [i] [j] , it seems that you have it The other should assign the way around.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -