In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you SpringBoot integration MybatisPlus how to achieve time assistant, I believe that most people do not know much, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Problem description
Given the current time, please read it out in English.
Time is expressed by time h and minute m. In English pronunciation, the way to read a time is:
If m is 0, read the tense and then add "o'clock", such as 3:00 as "three o'clock".
If m is not 0, read the tense and then read it separately, such as 5:30 as "five thirty".
The reading of hours and minutes uses the reading of English numbers, in which 020 is read as:
0:zero, 1: one, 2:two, 3:three, 4:four, 5:five, 6:six, 7:seven, 8:eight, 9:nine, 10:ten, 11:eleven, 12:twelve, 13:thirteen, 14:fourteen, 15:fifteen, 16:sixteen, 17:seventeen, 18:eighteen, 19:nineteen, 20:twenty .
Read as thirty,40, read as forty,50, read as fifty.
For numbers greater than 20 and less than 60, read the whole ten first, and then add single digits. For example, 31 is read as "thirty one" when you first read 30 and then add 1.
According to the above rules, 21:54 is read as "twenty one fifty four", 9:07 as "nine seven", and 0:15 as "zero fifteen".
Input format
The input contains two non-negative integers h and m, representing the time and minutes of time. A non-zero number is not preceded by a leading 0. H less than 24 and m less than 60.
Output format
Output time and time in English.
Program list # includeusing namespace std;string str1 [21] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"} String str2 [5] = {"ten", "twenty", "thirty", "forty", "fifty"}; string readTime (int num) {string output;if (num)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.