Write a program in java to print the following pattern
A
b c
D E F
g h i j
K L M N O
class Pattern { public static void main(String args[]) { char c = 'A'; for(int i=1; i<=5; i++) { if(i%2==0) c = Character.toLowerCase(c); else c = Character.toUpperCase(c); for(int j=1; j<=i; j++) { System.out.print(c + " "); c++; } System.out.println(); } } }
Howdy! This is my 1st comment here so I just wanted to give
a quick shout out and tell you I genuinely enjoy reading through your blog posts.
Can you suggest any other blogs/websites/forums
that cover the same subjects? Thank you so much!