Skip to content

Instantly share code, notes, and snippets.

@PandyYang
Created April 15, 2018 08:56
Show Gist options
  • Save PandyYang/41fc255b4adb4f154dfe9dea8cc6d9e3 to your computer and use it in GitHub Desktop.
Save PandyYang/41fc255b4adb4f154dfe9dea8cc6d9e3 to your computer and use it in GitHub Desktop.
打印倒三角
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