-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInverseArrow.java
More file actions
32 lines (28 loc) · 627 Bytes
/
InverseArrow.java
File metadata and controls
32 lines (28 loc) · 627 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
30
31
32
class InverseArrow
{
public static void main(String[] args)
{
int count = 5;
for(int row = 1 ; row <= 5 ; row++){
for(int space = count ; space >= 1 ; space--){
System.out.print(" ");
}
count--;
for(int col = 1 ; col <= row ; col++){
System.out.print("-");
}
System.out.println();
}
int count2 =5;
for(int row = 1 ; row <= 5 ; row++){
for(int space = 1 ; space <= row; space++){
System.out.print(" ");
}
for(int col = count2 ; col >= 1 ; col--){
System.out.print("-");
}
count2--;
System.out.println();
}
}
}