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
Ivanshal [37]
3 years ago
13

Write a program, TwoDimentionalGrid. Ask the user to enter the size of the 2 dimensional array. Here we are not doing any input

validation. We are assuming, user is going to enter a number greater than 1. Create a 2D array with the same row and column number. Now print the array as a number grid starting at 1. Example: At place row number 3 and column number 2, number would be 6 (3*2). Any number would be the product of it's row number and column number. Hint: Use setw 5. Expected Output: Here I am attaching 2 expected output. Make sure your code is running for both input.
Computers and Technology
1 answer:
Nitella [24]3 years ago
4 0

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Array size: ");

 int n = input.nextInt();

 int[][] myarray = new int[n][n];

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

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

         myarray[i][j] = i * j;      }  }

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

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

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

     System.out.println();  }

}}

Explanation:

This prompts the user for the array size

 System.out.print("Array size: ");

This gets input for the array size

 int n = input.nextInt();

This declares the array

 int[][] myarray = new int[n][n];

This iterates through the rows

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

This iterates through the columns

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

This populates the array by multiplying the row and column

         myarray[i][j] = i * j;      }  }

This iterates through the rows

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

This iterates through the columns

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

This prints each array element

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

This prints a new line at the end of each row

     System.out.println();  }

}

You might be interested in
Bobbi owns a protein shake company, which has been trading for 3 years. Her products are stocked in a number of gyms, but the co
N76 [4]

Answer:

Actions that Bobbi should take to identify opportunities for online business growth are:

Review competitor websites

Identify a USP

Build a SWOT analysis

Explanation:

The first thing Bobbi should do is to review competitor website.

This will give her information about her competitors the products that they offer, the price of their products, the website layout and structure of the competitors, any strategy they are using to boost their online product sale  such as by offering product promotion, discounted price etc.  

After reviewing competitor websites, next thing that Bobbi should do is  identify a Unique Selling Proposition. Bobbi should identify the unique features, benefits of her products that induce her business to stand out from the competitors. Identify all those unique aspects and factors that make her product different from others.

After identifying USP, Bobbi should now build a Strengths, Weaknesses, Opportunities and Threats (SWOT) analysis. This way she will be able to  recognize and understand her website's strengths, distinctive competencies, limitations, opportunities and risks. This will help her to analyse the overall strategic position of her website as well as her business. That will help her create a strategy for the future.

8 0
4 years ago
Identify the end-to-end processes that should appear in the process landscape model.
antoniya [11.8K]

The end-to-end processes that need to appear in the process landscape model  are:

  • Design
  • Plan
  • Services
  • Stores, etc.

<h3>What are the end-to-end processes?</h3>

End-to-end is known to be a term that connote a process that takes a system or service from the start to finish.

Note that it often delivers a full functional solution, and it is one that is without needing to get  anything from a third party.

The process landscape is known to be made up of domain map that tends to captures core processes of industrial firms such as forecast to plan and others.

Hence, The end-to-end processes that need to appear in the process landscape model  are:

  • Design
  • Plan
  • Services
  • Stores, etc.

Learn more about landscape model from

brainly.com/question/7027022

#SPJ1

8 0
2 years ago
name instances in the past where social media has kept you informed about the latest news around the country​
Luba_88 [7]
BLM movement and protests,
The election, school shootings, and the pandemic
3 0
3 years ago
Read 2 more answers
What refrigerant has been approved for new household refrigerators and freezers
Alexxx [7]
Bsbsnsnsnsn jajwjemoeododhdhdw whajsjshtzzvsssnxbba. 3
8 0
3 years ago
A friend has a CD of one of your favorite artists and has offered to let you copy it.
creativ13 [48]
No; copyright laws protect this artist's rights and I need to purchase the CD if I want it.  

This is due to copyrights being applied at the time of fixation.  In other words, as soon as the words or lyrics have been placed on paper, recorded or put in a computer the ARTIST is protected.
6 0
3 years ago
Other questions:
  • Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to
    5·1 answer
  • What does the group on option do?
    10·1 answer
  • Write a program that generates a random number between 5 and 15 and asks the user to guess what the number is. If the user’s gue
    5·1 answer
  • Write a function safeOpen() that takes one parameter, filename — a string giving the pathname of the file to be opened for readi
    15·1 answer
  • what type of machine is a ramp for wheelchairs? compound machine, mechanical, machine complex machine, simple machine
    15·2 answers
  • Write a C++ program to find if a given array of integers is sorted in a descending order. The program should print "SORTED" if t
    14·1 answer
  • What is the name for the size and style of text?
    8·2 answers
  • What best describes the ability to increase the access to server resources and provide fail-safe services by linking two or more
    13·1 answer
  • What what do these two parts of the lift do ​
    14·1 answer
  • what impact of information communication technology have on the environment about electronic waste, use of electricity?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!