Answer:
class Main {
static void printPowers(int howMany, int nrRows) {
for(int n=1; n<=nrRows; n++) {
for(int power = 1; power<=howMany; power++) {
System.out.printf("%d ", (int) Math.pow(n, power));
}
System.out.println();
}
}
public static void main(String[] args) {
printPowers(3, 5);
}
}
class Main {
static void printPowers(int howMany, int nrRows) {
int n = 1;
do {
int power = 1;
do {
System.out.printf("%d ", (int) Math.pow(n, power));
power++;
} while (power <= howMany);
System.out.println();
n++;
} while (n <= nrRows);
}
public static void main(String[] args) {
printPowers(3, 5);
}
}
Explanation:
The for loop gives the cleanest, shortest code.
Answer:
it is c
Explanation:
cus of the long and huge hall of u have in ur school
Answer:
c.O(n)
Explanation:
In the array based list implementation of the ADT the worst case time complexity of the getEntry method is O(n).In the worst case it has to travel upto n elements then it has to do the operation.In doing so the time complexity will come out to be O(n).So we conclude that the answer to this question is O(n).
Answer:
Permanent storage, also called persistent storage, is any computer data storage device that retains its data when the device is unpowered. A common example of permanent storage is the computer's hard drive or SSD.
Explanation: