FindDividersOfNumber. C++ Tutorials. Embarcadero Rad Studio IDE. Simple Input/Output. Algorithms. Windows Platform. Console Application.
A console application in the C++ programming language. The program does the following:
- Asks the user to enter a positive integer.
- The message displayed is: "The number has the following divisors:"
- The loop with the parameter is executed:
- The initial value of the parameter is set to 1, and the final value is set to the number entered from the keyboard.
- A series of loops is executed, where the remainder from dividing the number entered from the keyboard by the loop variable-parameter is calculated.
- If the remainder is zero, the value of the loop parameter is displayed on the screen.
- The value of the loop parameter is compared with the final value. If it is less, the loop is executed. Otherwise, it terminates.
- The loop parameter variable is incremented by the loop increment. In this example, it is 1.
- The program waits for the "Enter" key to be pressed before terminating.
Developed in the Embarcadero Rad Studio integrated environment.
FindDividersOfNumber. ИС Rad Studio. Занятия по C++. Простой Ввод/Вывод. Алгоритмы. Платформа Windows. Консольное приложение.
Консольное приложение написанное на языке программирования C++. Программа делает следующее:
- Просит пользователя ввести целое положительное число.
- Выводится сообщение:"Число имеет следующие делители:"
- Выполняется цикл с параметром:
- Начальное значение параметра уставливается равным 1, а конечное - числу, введённому с клавиатуры.
- Выполняется серия цикла, где вычисляется остаток от деления числа, введённого с клавиатуры на переменную-параметр цикла.
- Если остаток равен нулю, то значение параметра цикла выводится на экран.
- Значение параметра цикла сравнивается с конечным. Если оно меньше цикл выполняется. В противном случае - завершается.
- Переменная параметра цикла увеличивается на шаг цикла. В данном примере он равен 1.
- Программа ждёт нажатия клавиши "ввод" перед завершением.
Разработано в интегрированной среде Embarcadero Rad Studio.