+ 1

plz execute this pattern.

a bc def ghij klmno pqrstu

8th Dec 2016, 4:33 AM
mamata sethy
mamata sethy - avatar
2 Réponses
+ 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(); } } }
8th Dec 2016, 8:23 AM
Mani Kanta
Mani Kanta - avatar
0
You could also take int alphabet = 97;//ASCII code of a
18th Dec 2016, 9:17 AM
Meghan
Meghan - avatar