Write a Java program to print the given pattern -
a
b c
d e f
g h i j
( PLEASE ANSWER THE QUESTION CORRECTLY AND I WILL MARK YOU AS A BRAINLIEST )
Answers
Answered by
1
Answer:
Explanation:
public class MyClass {
public static void main(String args[]) {
int p=97;
for(int i=1;i<=4;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print((char)p+" ");
p=p+1;
}
System.out.println();
}
}
}
hope it helps you....
Similar questions