Telegram Group & Telegram Channel
Узнаем сколько лет человеку по дате его рождения

В этом коде мы запрашиваем у пользователя его дату рождения, а затем получаем текущую дату с помощью функции time. Затем мы используем структуру tm для извлечения года, месяца и дня из текущей даты и вычисляем количество полных лет с помощью формулы now->tm_year + 1900 - year. Если текущий месяц и день меньше, чем месяц и день рождения, мы уменьшаем возраст на 1. Наконец, мы выводим результат на экран.

➡️ @cpp_geek



tg-me.com/cpp_geek/273
Create:
Last Update:

Узнаем сколько лет человеку по дате его рождения

В этом коде мы запрашиваем у пользователя его дату рождения, а затем получаем текущую дату с помощью функции time. Затем мы используем структуру tm для извлечения года, месяца и дня из текущей даты и вычисляем количество полных лет с помощью формулы now->tm_year + 1900 - year. Если текущий месяц и день меньше, чем месяц и день рождения, мы уменьшаем возраст на 1. Наконец, мы выводим результат на экран.

➡️ @cpp_geek

BY C++ geek




Share with your friend now:
tg-me.com/cpp_geek/273

View MORE
Open in Telegram


C geek Telegram | DID YOU KNOW?

Date: |

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

C geek from ar


Telegram C++ geek
FROM USA