/time-calculator

time-calculator in C++ for calculating duration of powercuts

Primary LanguageC++MIT LicenseMIT

Time-Calculator

Time Calculator, as the name states, calculates time(except seconds).

Automated version

Detects whether power exists or not, if not, it auto updates into the database after all the necessary calculations.

Working:

  • User is asked to enter the limit, i.e., max number of entries.
  • Entries are taken one by one in hh1:mm1-hh2:mm2 format.
  • The Difference is calculated and then the Differences are Added together to give the output.

Story behind Time-Calculator's existance

I live in a City, where the Government doesn't care about citizen but money and power. In a day(24 hours), I live without any sort of power for atleast 10 hours, which kinda suck! and I hate it. I complained this to them a ton of times but in vain without any proofs of timings. So, I decided to make a note of timings of power cuts. Ok, I noted them all, who the hell gonna calculate all these? searched the internet and found some websites that can only take 2 inputs which in our case is hh1 and hh2. But I'd much more inputs! I couldn't find a reliable website and within seconds my mind said that "I'm a coder and haven't coded for about, more than 10 months straight! why not start doing it now!?" and voila! I started this easy project in the morning in C++ language which is my favourite of all. Spent some time in getting used to it.
Started this in the morning at around 12:06PM and ended at around 6:27PM in the evening. Had a lot of fun writing the code hitting my head around, searching for doubts and errors on DuckDuckGo and felt like an experienced newbie, lol!