Posted by : Unknown Thursday, 11 June 2015

class Alphabet
{
public static void main(String[] args)
{
char ch='A';
int count=0;
for(int i=0;i<6;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(ch++);
count++;
}
System.out.println(" ");
}
System.out.println("Count: "+count);
}
}

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 -