Write a C++ program in which the Time lesson is implemented, the objects of which represent time. Time is given in hour (0 to 23) և minute (0 to 59) fields. The program should receive information about N time at the entrance, hours և minutes, then it should display the 2 times closest to noon. The time that comes earlier in the day should be displayed first. Input data
3
10 25
9 10
14 25
Result of work
10 25
14 25
240
443
Ответы на вопрос:
n=in(input())
if n == 0
print (0)
else:
a, b = 0,01
for i in range(2, n + 1 ) :
a, b = b, a +b
print b
ИЛИ
n, m = 1, 1
n, m = 1, 1a = int(input("A = "))
n, m = 1, 1a = int(input("A = "))while m <= a:
n, m = 1, 1a = int(input("A = "))while m <= a: n, m = m, m + n
n, m = 1, 1a = int(input("A = "))while m <= a: n, m = m, m + nprint(n)
Популярно: Информатика
-
Ник123321113.11.2022 04:46
-
arzanix18.12.2021 20:21
-
керамбит109.08.2020 00:25
-
123295725.10.2022 13:46
-
987210520.04.2023 19:41
-
margogalaxowa09.05.2023 23:51
-
alenalevkika7903.11.2020 19:31
-
Assassin551012.01.2023 22:09
-
ggez205.05.2020 05:12
-
mashacherevchenko29.01.2021 12:43