+ 1
plz execute this pattern.
a bc def ghij klmno pqrstu
2 Answers
+ 1
public class Demo{
public static void main(String[] args){
int alphabet=65; // ASCII value of A
for(int I=1; I<7;I++){
for(int j=1;j<=I;j++){
System.out.println((char) alphabet);
alphabet++;
}
System.out.println();
}
}
}
0
You could also take
int alphabet = 97;//ASCII code of a