Answer:
public class Pyramid {
public static void main(String[] args) {
int h = 7;
System.out.println("Pattern A");
for(int i = 1; i <= h; ++i)
{
for(int j = 1; j <= i; ++j) {
System.out.print("+");
}
System.out.println();
}
System.out.println();
System.out.println("Pattern B");
for (int i = 1; i<=h; ++i)
{
for(int j = h; j >=i; --j){
System.out.print("+");
}
System.out.println();
}
}
}
Explanation:
- The trick in this code is using a nested for loop
- The outer for loop runs from i = 0 to the heigth of the triangle (in this case 7)
- The inner for loop which prints the (+) sign runs from j = 0 to j<=i
- It prints the + using the print() function and not println()
- In the pattern B the loop is reversed to start from i = height
Answer:
True
Explanation:
You can learn through many different textbooks that a closed system is always closed.
The radio buttons are used when only one option is to be selected from the several possible choices. Thus, option A is correct.
<h3>What are radio buttons?</h3>
Radio buttons can be understood as the elements of selection a single option amongst the multiple suitable options. The default icon for the radio buttons is the blank circle.
Therefore, option A Radio buttons is correct.
Learn more about radio buttons, here:
brainly.com/question/14316393
#SPJ1