subject

Write a Java program that creates the following matrix by adding 3 to the previous value, then displays it. This is another program that doesn't seem very useful. However, later on in the course, when we get to two-dimensional arrays, you'll use techniques like this to get row totals, column totals, and grand totals as you go through real data. So start small now. Specifics: 1. Code this as a single main() method (i. e., do not use any additional methods for this problem). 2. Notice the starting value is 0. Use an accumulator variable to store and manage the value being displayed. Don't try to use column or row position—just start at 0 and keep adding 3 each time you output something. 3. The matrix has 6 rows and 4 columns. Allow for a fixed width of 6 horizontal columns for each value in the display. Notice the digits are right aligned. Use printf to do this. Go back to earlier notes, Notes 3, or look it up online. 4. Sample output follows. Don't display the yellow line and its values—just the rows below it. It's only there to help you visualize how to line things up and construct your printf statement g

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
Write and test a python program to find and print the largest number in a set of real (floating point) numbers. the program should first read a single positive integer number from the user, which will be how many numbers to read and search through. after reading in all of the numbers, the largest of the numbers input (not considering the count input) should be printed.
Answers: 1
You know the right answer?
Write a Java program that creates the following matrix by adding 3 to the previous value, then displ...
Questions
question
Social Studies, 27.08.2019 11:30
Questions on the website: 13722361