print pattern Aa Bb Cc DD Ee Ff Gg
till Zz in java please tell anyone
Answers
Answered by
2
Answer:
class pattern
{
public static void main(String[] args)
{
int n = 4;
for(int i = 0 ; i <= n ; i++)
{
for(int j = 0 ; j <= i ; j++)
{
System.out.print(" "+(char)(65 + i));
}
System.out.println("");
}
}
}
But this is the
Output:
A
B B
C C C
D D D D
E E E E E
Similar questions