Telegram Group & Telegram Channel
Рост численности населения

В небольшом городе население в начале года составляет p0 = 1000 человек. Население регулярно увеличивается на 2 процента в год, и кроме того, в город приезжает 50 новых жителей в год. Сколько лет нужно городу, чтобы его население стало больше или равно p = 1200 жителей?

At the end of the first year there will be: 
1000 + 1000 * 0.02 + 50 => 1070 inhabitants

At the end of the 2nd year there will be:
1070 + 1070 * 0.02 + 50 => 1141 inhabitants (** number of inhabitants is an integer **)

At the end of the 3rd year there will be:
1141 + 1141 * 0.02 + 50 => 1213

It will need 3 entire years.


Более общие заданные параметры:
p0, percent, aug (inhabitants coming or leaving each year), p (population to equal or surpass)


Функция nb_year должна возвращать n количество полных лет, необходимых для получения численности населения, большей или равной p.

aug - целое число, percent - положительное или нулевое плавающее число, p0 и p - положительные целые числа (> 0)

Примеры:
nb_year(1500, 5, 100, 5000) -> 15
nb_year(1500000, 2.5, 10000, 2000000) -> 10


👉 @frontendInterview



tg-me.com/frontendInterview/4592
Create:
Last Update:

Рост численности населения

В небольшом городе население в начале года составляет p0 = 1000 человек. Население регулярно увеличивается на 2 процента в год, и кроме того, в город приезжает 50 новых жителей в год. Сколько лет нужно городу, чтобы его население стало больше или равно p = 1200 жителей?

At the end of the first year there will be: 
1000 + 1000 * 0.02 + 50 => 1070 inhabitants

At the end of the 2nd year there will be:
1070 + 1070 * 0.02 + 50 => 1141 inhabitants (** number of inhabitants is an integer **)

At the end of the 3rd year there will be:
1141 + 1141 * 0.02 + 50 => 1213

It will need 3 entire years.


Более общие заданные параметры:
p0, percent, aug (inhabitants coming or leaving each year), p (population to equal or surpass)


Функция nb_year должна возвращать n количество полных лет, необходимых для получения численности населения, большей или равной p.

aug - целое число, percent - положительное или нулевое плавающее число, p0 и p - положительные целые числа (> 0)

Примеры:
nb_year(1500, 5, 100, 5000) -> 15
nb_year(1500000, 2.5, 10000, 2000000) -> 10


👉 @frontendInterview

BY Frontend Interview - собеседования по Javascript / Html / Css




Share with your friend now:
tg-me.com/frontendInterview/4592

View MORE
Open in Telegram


Frontend Interview собеседования по Javascript Html Css Telegram | DID YOU KNOW?

Date: |

The global forecast for the Asian markets is murky following recent volatility, with crude oil prices providing support in what has been an otherwise tough month. The European markets were down and the U.S. bourses were mixed and flat and the Asian markets figure to split the difference.The TSE finished modestly lower on Friday following losses from the financial shares and property stocks.For the day, the index sank 15.09 points or 0.49 percent to finish at 3,061.35 after trading between 3,057.84 and 3,089.78. Volume was 1.39 billion shares worth 1.30 billion Singapore dollars. There were 285 decliners and 184 gainers.

Frontend Interview собеседования по Javascript Html Css from us


Telegram Frontend Interview - собеседования по Javascript / Html / Css
FROM USA