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).
Even numbers are numbers whigh are divisible by 2. Therefore, the first even number is 2. A pseudocode which adds the first 100 even numbers can be written thus :
counter = 0
sum = 0
interval = 2
while counter < 100 :
sum = sum + interval
interval += 2
counter +=1
print(sum)
- A counter takes count of the number of values summed
- Initializes a variable which holds the sum of even values
- Since even numbers are divisible by 2; every factor ; increase every added value by 2
- The program ends once counter is 100
Learn more : brainly.com/question/25327166
Answer:
She is 17 her fav color is Blue And her fav subject is Science
Explanation:
Answer:
Here is my answer in Javascript
num = 0; // Use to calcate the even numbers
loop = 10; // Use for the highest even number that will be calcated for
index = loop/2; // Calcate the size of the array based upon how many loops their
let arr = [index]; //Create array to store the even numbers
let i = 0; // Use to keep track of which on what number in the while loop we are on
let total = 0; //Used to add up all of the even numbers
let mean = 0; //Used to calcate the mean of all even numbers
do {
i = i + 1; //Keep track of what loop we are on
num = num + 2; //Used to calcate the even number
arr.push(num); //Push the num into a array
total = total + arr[i]; //Calcate the total of the array
mean = total / i; //Calcate the mean
}
while (num != loop);
//Output the result
console.log(mean);
Answer:
The time zone on the California server needs to be changed.
Explanation:
A user seems to be the admin in Nyc over several servers running on the following Windows Server. His firm has just established a California branch, so transfer some of the servers to that of the new firm. Its server had been fully operational in less than 2 days of the user sending it. Now that the user has issues in authenticating between both the California server and the Nyc domain controllers.
So, the following issues are occurring in authenticating the servers of both places because the timezone of both places is different and they need to change the time zone on the California server.