*
* *
* * *
* * * *
* * * * *
Solution:
class Pattern3
{
public static void main(String args[])
{
for(int i=1;i<6;i++)
{
for(int j=1;j<=i;j++)
{
if(j==1)
{
for(int k=6-i;k>0;k--)
{
System.out.print(" ");
}
}
System.out.print("* ");
}
System.out.println();
}
}
}
A
ReplyDeleteA B
A B C
A B C D
I need help to code the above pattern
Hello Shaharica Balu.
DeleteAs per your request I have uploaded same kind of program on blog.
In such kind of programs,you have to make use of ASCII values of Characters.
Just check the code uploaded recently with title "Write java code to print following pattern".
Thank you
********
ReplyDelete*******
******
*****
****
***
**
*
i need your help to code the above pattern
Hello Tyka.
DeleteI think I have uploaded same kind of program on this blog.
But for your convenience I am uploading it here.
class printStar
{
public static void main(String abc[])
{
for(int i=8;i>0;i--)
{
for(int j=1;j<=i;j++)
{
System.out.print("*");
}
System.out.println();
}
}
}