Skip to content

Commit 2617fb4

Browse files
committed
Changed for consistency
1 parent 603918d commit 2617fb4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ballerina/clockhands.bal

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ public function main() {
44
foreach int i in 0...10 {
55
int t = (43200 * i + 21600) / 11;
66
int h = t / 3600;
7-
int m = t % 3600;
8-
io:println(`${h == 0 ? 12 : h.toString().padZero(2)}:${(m / 60).toString().padZero(2)}:${(m % 60).toString().padZero(2)}`);
7+
int m = t / 60 % 60;
8+
int s = t % 60;
9+
io:println((h == 0 ? "12" : h.toString().padZero(2)) + ":"
10+
+ (m).toString().padZero(2) + ":"
11+
+ (s).toString().padZero(2));
912
}
1013
}

0 commit comments

Comments
 (0)