Tuesday, 2 July 2013

Pattern in Java

/*
To Print Patterns (Pyramid)

*
**
***
****
......
n......n


*/


import java.io.*;


class Pattern
{
public static void main(String args[]) throws IOException
{

BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

System.out.println("ENTER THE NO OF ROWS TO PRINT PATTERN");
int n = Integer.parseInt(input.readLine());


for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print("*");
}
System.out.println();
}

}
}

2 comments:

  1. Lucky Club Casino Site - Lucky Club Casino
    Welcome to the Lucky Club online casino, one of the top online and mobile gambling casinos in the world. Enjoy great offers from Lucky Club Bonus: luckyclub Welcome Bonus of 100% up to $600Min Deposit: $10Minimum Deposit: $10

    ReplyDelete
  2. CASINO - MapyRO
    The Casino at Kansas Speedway features 12 live events 구리 출장안마 every Tuesday night and 7 부산광역 출장안마 progressive 고양 출장마사지 jackpots. This week's events 광양 출장마사지 include: • Progressive jackpots · Jackpots 삼척 출장샵

    ReplyDelete