c++ 初级 ,我该怎么做,🙏🙏

start: 2021-03-03 09:00:00, stop: 2021-03-03 21:51:38
start: 2021-03-03 22:51:38, stop: 2021-03-04 02:10:44
start: 2021-03-04 03:10:44, stop: 2021-03-04 15:15:41
start: 2021-03-04 16:15:41, stop: 2021-03-05 03:37:11
start: 2021-03-05 04:37:11, stop: 2021-03-05 13:43:33
start: 2021-03-05 14:43:33, stop: 2021-03-05 22:04:12
start: 2021-03-05 23:04:12, stop: 2021-03-06 11:02:25
start: 2021-03-06 12:02:25, stop: 2021-03-06 21:32:53
start: 2021-03-06 22:32:53, stop: 2021-03-07 07:48:56
start: 2021-03-07 08:48:56, stop: 2021-03-07 18:46:56
start: 2021-03-07 19:46:56, stop: 2021-03-07 22:33:49
start: 2021-03-07 23:33:49, stop: 2021-03-08 07:19:41
start: 2021-03-08 08:19:41, stop: 2021-03-08 19:59:41
start: 2021-03-08 20:59:41, stop: 2021-03-09 07:31:

这是打印机这个月的使用次数,时间跟日期,如何读取,并输出,这台打印机的这个月的使用频率,最长时间,最短时间,跟平均时间

这个问题应该不难吧,这里给你说一下简单思路
使用次数:用一个变量cnt计数,它输入一次,你就加一次。
日期的读取可以用字符串,然后再将它转成数。转数时只需要转小时,分钟,秒。日期不用转。
使用频率:根据使用次数算。
最长时间:每次它输入后你都将使用时间算出来,然后和当前的最大时间比。
最短时间:也是每次它输入后你都将使用时间算出来,然后和当前的最短时间比。
平均时间:将每次你算出来的时间加在一起,最后除以使用次数。
先给你一个简单的思路,你自己想想,如果还有什么地方不明白,我再告诉你