You can try drinking herbal tea if you're having trouble sleeping.
Answer:
explain
Explanation:
sorry didn't understand a thing you said except copying and pasting documents
See below for the modified program in Java
<h3>How to modify the program?</h3>
The for loop statements in the program are:
- for (int i = 0; i < arr.length; i++) { arr[i] = rd.nextInt(1000); }
- for (int i = 0; i < arr.length; i++) { System.out.println(arr[i]); }
To use the enhanced for loop, we make use of the for each statement.
This syntax of the enhanced for loop is:
for(int elem : elems)
Where elem is an integer variable and elems is an array or arrayList
So, we have the following modifications:
- i = 0; for (int num : arr){ arr[i] = rd.nextInt(1000); i++;}
- for (int num : arr) { System.out.println(num); }
Hence, the modified program in Java is:
class Main {
static int[] createRandomArray(int nrElements) {
Random rd = new Random();
int[] arr = new int[nrElements];
int i = 0;
for (int num : arr){
arr[i] = rd.nextInt(1000);
i++;
}
return arr;
}
static void printArray(int[] arr) {
for (int num : arr) {
System.out.println(num);
}
}
}
public static void main(String[] args) {
int[] arr = createRandomArray(5);
printArray(arr);
}
}
Read more about enhanced for loop at:
brainly.com/question/14555679
#SPJ1
Answer:
what are you trying to say
Explanation:
?
Answer:
= C6/$C$20
Explanation:
Given
Cell C6 ; Cell C20 and Cell E6
Cell C6 = DVD Sales
Cell C20 = Total Sales
Cell E6 = The result cell.
Cell E6 gets it value by calculating the percentage of DVD sales.
In other words, E6 = C6/C20
From the question, cell C20 is to be referenced using absolute reference.
The absolute reference ensures that the value never changes no matter where the formula is copied. The dollar sign ($) fixes the reference to a given cell.
So, cell C20 will be referenced like this: $C$20
While cell C6 will be referenced using the default relative reference (C6)
The percentage formula will be entered in cell E6 as this
= C6/$C$20
Click the Percent Style button (Home tab > Number group) to display the resulting decimal fractions as percentages.
Increase the number of decimal places if needed