-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.java
More file actions
26 lines (26 loc) · 657 Bytes
/
A.java
File metadata and controls
26 lines (26 loc) · 657 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
class A
{
public static void main(String args[])
{
for(int x=1;x<=7;x++){
for(int y=1;y<=7;y++){
if(x==4){
System.out.print("*");
}
else if(x+y==5){
System.out.print("*");
}
else if(y-x==3){
System.out.print("*");
}
else if(x>4 && (y==1 || y==7)){
System.out.print("*");
}
else{
System.out.print(" ");
}
}
System.out.println();
}
}
}