Created
April 15, 2018 08:56
-
-
Save PandyYang/41fc255b4adb4f154dfe9dea8cc6d9e3 to your computer and use it in GitHub Desktop.
打印倒三角
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ForForTest2 { | |
public static void main(String[] args){ | |
for (int x = 1;x<=5;x++){ | |
for (int y = 1;y<x;y++){ | |
System.out.print("-"); | |
} | |
for (int z = x;z<=5;z++){ | |
System.out.print("*"); | |
} | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment