Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TrianglePattern {
- // once I get out of practice I have to diddle
- // with these before I get them right. So, take heart. Don't be discouraged.
- // play around with the spacing and see what happens
- public static void main(String[] args) {
- for (int i=0; i<5; i++){
- for (int j = 4-i; j>0 ;j--){
- System.out.print(" ");
- }
- for (int k= i+1; k>0; k--){
- System.out.print("*");
- }
- System.out.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement