1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kisachek [45]
3 years ago
13

Write a Java program in jGRASP that creates a 2D integer array of 5 rows and 20 columns, fills it with increasing integer values

ranging from 0 to 59 and then prints the array
Computers and Technology
1 answer:
Alex73 [517]3 years ago
7 0

Answer:

As per the question we need to make 5 rowa and 2o columns, in this we have total element 100 so range should be 0 to 99, but we are suggested to keep range 0 to 59, so i have kept the elementns in the range, but if it was a typo in the question for range you do not need to reset the k with zero.

Explanation:

//create a new class  TestArray

public class TestArray {

//define main method

public static void main(String[] args) {

 //declare a 2D array of given size i.e. 5 rows and 20 columns

 int arr[][] = new int[5][20];

 //declare an integer variable k and initialize it with zero, this will used to initialize the array from 0 to 99

 int k = 0;

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //initialize arr with the current value of k

   arr[i][j] = k;

   //once k is 59 set it zero again as we are not going beyond 59

   if(k == 59)

    k = 0;

   //increment value of k with 1

   k++;

  }

 }

 //print the element from the array one by one

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //print the current element of array and an space with it

   System.out.print(arr[i][j]+" ");

  }

  // move the cursor to new line

  System.out.println();

 }

}

}

You might be interested in
Universal containers wants to rollout new product bundles with several pricing options. Pricing options include product-price bu
ololo11 [35]

Answer:

a) Custom AppExchange-app for product-pricing

Explanation:

We can find a solution in AppExchange for this product-pricing, surfing in the option, we could get solutions like BoonPlus, and easy pricing Opportunity, this App has a free trial.

With this option is easy to choose a book price, add new products, select pricing rule, we can get an order's product, and calculate pricing, just we must download the app and install it.

6 0
3 years ago
A __________ note is a private note that you leave for yourself or for other people who might use the presentation file
BaLLatris [955]

Answer:

The answer is that it is a speaker note.

Explanation:

It leaves a note for people that use presentation files. I use it all the time on my google slides.

7 0
2 years ago
Which of the following is not an example malicious code<br> A.Trojan horse B.worm C.virus D.spygear
umka21 [38]
B would be the correct answer

7 0
3 years ago
Read 2 more answers
Alison discovers that a system under her control has been infected with malware, which is using a key logger to report user keys
Bond [772]

Mostly the spyware and malware protection for desktop and laptop or workstations are to protected with anti-virus regular updates. All workstation or desktop or laptops are to updated operating systems patches.

If any operating systems patched update to be schedule and checked regularly. Schedule scanning by virus scanner to be made for desktop and laptop or workstations in regular interval basis

There are third parties tools such as malware and ADWCLEANER are also available free scanner software through internet where end user can download and scanner so software will clean the malware.

Mostly end user do mistake keep the files in desktop. Most of the malware software will affect the desktop folder only.

It will also affect c:\users folder and register enter keys.

7 0
3 years ago
You should check your battery ___________. Every week Never Every six months Every 30,00 miles
vova2212 [387]

The answer is Every six months

A battery acts as the brain of a car and is used to power almost everything. It can last up to five years. However, this lifespan will depend on how well the battery is maintained and the type of weather conditions you live in. Aim to check your car battery at least twice a year. Actually, it is best to check your battery regularly and not to wait for your mechanic to test your battery during routine servicing.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these is a typographical clue?
    9·2 answers
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • What type of diagram will you find nodes?
    15·1 answer
  • Linda subscribes to a cloud service. The service provider hosts the cloud infrastructure and delivers computing resources over t
    10·1 answer
  • _________function tells the cin object to skip one or more characters in the keyboard buffer.
    11·1 answer
  • Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers s
    14·1 answer
  • Widow in respect to word processing ​
    15·1 answer
  • Summary about Interface Design in system analysis
    12·1 answer
  • A menu that appears when an object is clicked with the right mouse button is called a tool-tip help menu
    10·1 answer
  • Question 1 of 10
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!