1.

Write a program in java to print the following patternAB CD E FG H I J K L M N O

Answer»

Answer:

Explanation:

CLASS alphabet

{

public static void main(STRING args[])

{

 int alpha=65;  /* ASCII Value of A is 65 */

 for(int i=1;i<6;i++)

 {

  for(int j=1;j<=i;j++)

  {

   System.out.print((CHAR)alpha);

   alpha++;

  }

  System.out.println();

 }

}

}

hope this PROGRAM helps you!!!



Discussion

No Comment Found