This question requires a program to output the specified inverted triangle pattern consisting.
Input Format:This topic is not entered.
Output Format:Output an inverted triangle pattern consisting of "*" in the following format.
**********
Note: follow the following style strictly.
I can't write it out of the for loop, so I had to use the stupid println line of output.
public class Main { public static void main(String[] args) { System.out.println("* * * *"); System.out.println(" * * *"); System.out.println(" * *"); System.out.print(" *"); }}
Which one wrote it by hand? Please leave a message and learn it!
As shown in the following figure, the output is a little similar, but it still does not conform to the above.
Public class main {public static void main (string [] ARGs) {for (INT I = 4; I> 0; I --) {for (Int J = 0; j <4-I; j ++) {system. out. print (""); // control the number of spaces before each line *. The first line has 0 spaces, and the second line has 1 space ...... // The number of spaces is dynamic, so I in the previous for is used for control. } For (int K = 0; k <I; k ++) {system. Out. Print ("*");} if (I! = 1) system. Out. println ();}}}
Output result:
IO-08. Output inverted triangle pattern (for loop write does not match, with stupid println, % >_<%)