Monday, 20 April 2020

Program print following sequence

ZYXWU
ZYXW
ZYX
ZY
Z


public class ATS
{
public static void main(String[]args)
{
for (int i = 86; i <= 90; i++)
{
for (int j = 90; j >= i; j--)
{
System.out.print((char)j);           
} System.out.println();       
}   
}
}

No comments:

Post a Comment