Posted by : Unknown Thursday, 11 June 2015

class LetterPyramid
{
public static void main(String args[])
{
char c;
int i,j;
for(i=65;i<=90;i++)
{
for(j=0;j<(i-64);j++)
{
c=(char)i;
System.out.print(c);
}
System.out.println();
}
}
}

Output:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

Blog Archive

- Copyright © Learning Java Program - Powered by Blogger -