Write a Java program to display the pattern:
A B C D E F
B C D E F
C D E F
D E F
E F
F
Answers
Answered by
3
Answer:
class pattern5
{
char i,ch;
void print()
{for(i=65;i<=70;i++)
{for(ch=i;ch<=70;ch++)
System.out.print(ch);
System.out.println();
}//outer for
public static void main()
{pattern5 ob=new pattern5();
ob.print();
}//main method
}//class
OUTPUT:
ABCDEF
BCDEF
CDEF
DEF
EF
F
HOPE IT HELPS!
Similar questions