-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLove.java
More file actions
29 lines (28 loc) · 859 Bytes
/
Love.java
File metadata and controls
29 lines (28 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
public class Love {
public static void main(String[] args) {
for(int i=4; i<=5; i++) {
for(int j=1; j<=12; j++) {
if (j>(5-i) && j<(5+i))
System.out.print("*");
else
System.out.print(" ");
}
for(int j=1; j<=9; j++) {
if (j>(5-i) && j<(5+i))
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
for(int i=13;i>=1;i-=2){
for(int j=1; j<=21; j++) {
if (j>(11-i) && j<(11+i))
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
}
}