Нужно вывести ответ на задачу! Вводиться последовательность целых чисел, оканчивающиеся числом О(сам О не входит) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Нужно вывести ответ на задачу! Вводиться последовательность целых чисел, оканчивающиеся числом О(сам О не входит)

Программа получает на вход последовательности целых неотрицательных чисел, каждое число записано в отдельной строке. Последовательность завершается числом О, при считывании которого программа должна закончить свою работу и вывести кол-во членов последовательности(не считая завершающего числа О)

2nd Dec 2017, 5:58 PM
Амилия
Амилия - avatar
1 Answer
+ 5
translated: "It is necessary to deduce the answer to the problem! Enter a sequence of integers ending in a number O (O itself is not included) The program receives an input of a sequence of non-negative integers, each number written in a separate line. The sequence is terminated by a number O, upon reading which the program must finish its work and output the number of members of the sequence (not including the trailing number O)" sounds like he wants us to do his homework for him >.>
2nd Dec 2017, 6:17 PM
Ahri Fox
Ahri Fox - avatar