Wednesday 22 April 2015

Mirror image of right angle triangle print from right side

package star;

public class stars4 {


public static void main(String[] args) {
int i,j,k;
   for(i=0;i<4;i++)
   {
      for(j=0;j<i;j++)
      {
          System.out.print(" ");
      }
      for(k=0;k<4-i;k++)
      {
          System.out.print("*");
      }
      System.out.print("\n");
   }
   }


}

No comments:

Post a Comment