Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/17bit0216/programming-assignment

You are given two strings each representing hour of a given day in the format yyyymmdd hh. For example, 20170317 03 represents hour 03 of 17th March 2017. Write a program in C or C++ to list all the hours in between the given hours (both inclusive) in increasing order, one entry per line. If the output has all 24 hours of a single day then it should compress it into the form yyyymmdd. Here are some sample inputs and their corresponding outputs: Example 1 Input: 20170317 22, 20170318 02 Output: 20170317 22 20170317 23 20170318 00 20170318 01 20170318 02 Example 2 Input: 20170317 22, 20170319 02 Output: 20170317 22 20170317 23 20170318 20170319 00 20170319 01 20170319 02 Hint: Consider all corner cases.
https://github.com/17bit0216/programming-assignment

Last synced: 2 days ago
JSON representation

You are given two strings each representing hour of a given day in the format yyyymmdd hh. For example, 20170317 03 represents hour 03 of 17th March 2017. Write a program in C or C++ to list all the hours in between the given hours (both inclusive) in increasing order, one entry per line. If the output has all 24 hours of a single day then it should compress it into the form yyyymmdd. Here are some sample inputs and their corresponding outputs: Example 1 Input: 20170317 22, 20170318 02 Output: 20170317 22 20170317 23 20170318 00 20170318 01 20170318 02 Example 2 Input: 20170317 22, 20170319 02 Output: 20170317 22 20170317 23 20170318 20170319 00 20170319 01 20170319 02 Hint: Consider all corner cases.

Awesome Lists containing this project