Computer Applications
Write a program in Java to display the following pattern:
ZYXWU
ZYXW
ZYX
ZY
Z
Java
Java Library Classes
74 Likes
Answer
public class KboatPattern
{
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();
}
}
}
Variable Description Table
Program Explanation
Output
Answered By
31 Likes
Related Questions
Write a program in Java to display the following pattern:
PRTV
PRT
PR
PWrite a program in Java to display the following pattern:
A
ab
ABC
abcd
ABCDEUsing switch case statement, write a menu driven program to perform the following tasks:
(a) To generate and print the letters from A to Z along with their Unicode.
Letters Unicode
A 65
B 66
….. ……..
….. ……..
Z 90(b) To generate and print the letters from z to a along with their Unicode.
Letters Unicode
z 122
y 121
….. ……..
….. ……..
a 97Write a program in Java to display the following pattern:
ABCDE
ABC
A