Monday 9 June 2014

Pattern 10

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

}}}

output:
 ****
  ***
   **
    *

No comments:

Post a Comment

SAY HELLO!!