From 946e4004aedb83cf8dd83cf71f34fa564b3b3cab Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 26 Nov 2020 03:29:08 +0300 Subject: [PATCH] Print msg for no arrival (avg) Signed-off-by: HeshamTB --- src/MakkahCity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MakkahCity.java b/src/MakkahCity.java index 04af540..35ebebb 100644 --- a/src/MakkahCity.java +++ b/src/MakkahCity.java @@ -532,6 +532,7 @@ public class MakkahCity { sum = sum /counter; int hours = sum / 60; int minutes = sum % 60; + if (hours == 0 && minutes == 0) return "(No arrivals) in last Hour"; return String.format("%2d:%02d", hours,minutes); }