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:
Made of Silicon.
Explanation:
A diode is a semiconductor device use in mostly electronic appliances. It is two terminals device consisting of a P-N junction formed either in Germanium or silicon crystal.
Diode can be forward biased or reverse biased.
When a diode is forward biased and the applied voltage is increased from zero, hardly any current flows through the device in the beginning.
It is so because the external voltage is being opposed by the internal barrier voltage whose value is 0.7v for silicon and 0.3v for germanium.
If you measure 0.7 V across a diode, the diode is probably therefore made of Silicon.
Follow @richard.gbe on Instagram for the answer