From bf8012db5ca41e6f9e2f2eb6601a5ac34fa4a96b Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 28 Jan 2024 20:23:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=81=D0=B5=D0=BA=D1=83=D0=BD=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examples/seconds-to-minutes-and-hours.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 content/posts/2024/examples/seconds-to-minutes-and-hours.md diff --git a/content/posts/2024/examples/seconds-to-minutes-and-hours.md b/content/posts/2024/examples/seconds-to-minutes-and-hours.md new file mode 100644 index 0000000..b2ca537 --- /dev/null +++ b/content/posts/2024/examples/seconds-to-minutes-and-hours.md @@ -0,0 +1,24 @@ +--- +title: "🕰️ Преобразование секунд в минуты и часы" +date: 2024-01-28T20:18:33+03:00 +draft: false +tags: [c, cpp, tips, development] +--- + +### Пример на Си + +```c +#include + +int main(int argc, char const *argv[]) { + unsigned int seconds = 800000 + 61; + unsigned int minutes = seconds / 60; + unsigned int hours = minutes / 60; + + printf("H: %d\nM: %d\nS: %d\n", hours, minutes % 60, seconds % 60); + + return 0; +} +``` + +🗨️ [Вопросы и предложения](https://t.me/db_o_qp)