Answer:
class TriangleNumbers
{
public static void main (String[] args)
{
for (int number = 1; number <= 10; ++number) {
int sum = 1;
System.out.print("1");
for (int summed = 2; summed <= number; ++summed) {
sum += summed;
System.out.print(" + " + Integer.toString(summed));
}
System.out.print(" = " + Integer.toString(sum) + '\n');
}
}
}
Explanation:
We need to run the code for each of the 10 lines. Each time we sum numbers from 1 to n. We start with 1, then add numbers from 2 to n (and print the operation). At the end, we always print the equals sign, the sum and a newline character.
Answer: a) 135642 b) 146253
Explanation:
A)
1- the bankers algorithm tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, as stated this has the greatest degree of concurrency.
3- reserving all resources in advance helps would happen most likely if the algorithm has been used.
5- Resource ordering comes first before detection of any deadlock
6- Thread action would be rolled back much easily of Resource ordering precedes.
4- restart thread and release all resources if thread needs to wait, this should surely happen before killing the thread
2- only option practicable after thread has been killed.
Bii) ; No. Even if deadlock happens rapidly, the safest sequence have been decided already.
Answer:it forms a molten mold that makes it hard to be able to smash something into it then make something like a key
Explanation:
Answer:
True
Explanation:
Tensile testing which is also referred to as tension testing is a process which materials are subjected to so as to know how well it can be stretched before it reaches breaking point. Hence, the statement in the question is true