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.
2 parents f293a0a + 0a1b427 commit 7926402Copy full SHA for 7926402
Pattern_Printing/Letter_T.java
@@ -0,0 +1,37 @@
1
+package Pattern_Printing;
2
+
3
+// Write a program to print letter T exactly as shown below -
4
5
+public class Letter_T {
6
+ // Driver code
7
+ public static void main(String[] args) {
8
+ // Number of lines for the Letter
9
+ int height = 7;
10
11
+ int i, j;
12
+ // Pattern printing
13
+ for (i = 0; i < height; i++) {
14
+ for (j = 0; j < height; j++) {
15
+ if (i == 0)
16
+ System.out.printf("$$");
17
+ else if (j == height / 2)
18
+ System.out.printf("@@");
19
+ else
20
+ System.out.printf(" ");
21
+ }
22
+ System.out.printf("\n");
23
24
25
+}
26
27
+// Output :
28
+/*
29
+$$$$$$$$$$$$$$
30
+ @@
31
32
33
34
35
36
37
+*/
0 commit comments