Showing posts with label Triangle Pattern No. 2 in JAVA. Show all posts
Showing posts with label Triangle Pattern No. 2 in JAVA. Show all posts

Saturday, October 10, 2015

Triangle Patter Number 2 in Java

A simple triangle pattern program that I wrote in my spare time using looping statements in Java. I intended my work for beginners in Java programming.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing


// pattern6.java
// Programmer : Mr. Jake R. Pomperada, MAED-IT
// Date       : July 19, 2015
// Tools      : Netbeans 8.0.2
// Email      : jakerpomperada@yahoo.com and jakerpomperada@gmail.com


class pattern6

{
 public static void patt(String str)

   {
    int l=str.length();
    for(int i=0;i<l;i++)
     {
       for(int j=0;j<=i;j++)
                System.out.print(str.charAt(j));
        System.out.println();
   }
   }
    public static void main(String[] args) {

    String Message="Java Programming is FUN";
     patt(Message);
             
    
    }

   }