Answer:
- import java.util.Random;
- import java.util.Arrays;
- public class Main {
-
- public static void main(String[] args) {
- int n = 10;
- int [] myArray = new int[n];
- buildArray(myArray, n);
- System.out.println(Arrays.toString(myArray));
- }
-
- public static void buildArray(int[] arr, int n){
- for(int i=0; i < arr.length; i++){
- Random rand = new Random();
- arr[i] = rand.nextInt(90) +10;
- }
- }
- }
Explanation:
Firstly, create a method buildArray that take two inputs, an array and an array size (Line 12). In the method, use random nextInt method to repeatedly generate a two digit random number within a for loop that will loop over array size number of times (Line 13-15). The expression rand.nextInt(90) + 10 will generate digits between 10 - 99.
In the main program, call the build array method by using an array and array size as input arguments (Line 8). At last, print the array after calling the buildArray method (Line 9).
Infinity amount of answers because each side can be simplified to x making any solution correct
When the person is not directly involved in the message but has a need to know about it.
Answer:
Out of the four options , the option that is most suitable is
option b. Cost, demand
<u>cost</u> or to <u>demand</u>
Explanation:
Going rate pricing is a form of competition based pricing. This pricing is commonly used for homogeneous products i.e., products with very minute distinction or variation among producers.
This type of pricing is based on setting price on the basis of the prevailing market trends in pricing of goods or services, so, the prices are largely based on the competition in the market rather than considering its own cost and demand.