We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075d88e commit be2c7aeCopy full SHA for be2c7ae
Pattern_Printing/Z.java
@@ -0,0 +1,21 @@
1
+// Write a program to print letter Z exactly
2
+class Z{
3
+ public static void main(String args[]){
4
+
5
6
+ for(int x=0;x<8;x++){ //for iteration of lines from top to bottom
7
+ for(int y=0;y<9;y++){ //for iteration of lines from left to right
8
+ if(x==0 || x==7){
9
+ System.out.print("@"); //to print @ where necessary
10
+ }
11
+ else if(x+y==7 || x+y==8){
12
+ System.out.print("#"); //to print # where necessary
13
14
+ else{
15
+ System.out.print(" "); //to print spaces where necessary
16
17
18
+ System.out.println();
19
20
21
+}
0 commit comments