I
CC
SSS
EEEE
Solution:
class printABCD
{
public static void main(String abc[])
{
char arr[]={'I','C','S','E'}; // Store alphabets in an array
for(int i=0;i<4;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(arr[i]);
}
System.out.println();
}
}
}
CC
SSS
EEEE
Solution:
class printABCD
{
public static void main(String abc[])
{
char arr[]={'I','C','S','E'}; // Store alphabets in an array
for(int i=0;i<4;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(arr[i]);
}
System.out.println();
}
}
}
No comments:
Post a Comment