EDCBA
EDCB
EDC
ED
E
print this using java.
Answers
Answered by
0
Answer:
import java.util.*;
class ap14
{
public static void main(String args[])
{
int i,j,n;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the no of lines");
n=sc.nextInt();
for(i=1;i<=n;i++)
{
for(j=n;j>=i;j--)
{
System.out.print((char)(j+64));
}
System.out.println("");
}
}
}
Similar questions