Module: (C++) サブルーチン: プロシージャと関数 - 1


Problem

11/12

数値のすべての約数

Problem

N のすべての約数をスペースで区切って 1 行に表示する手続きを作成してください。
この手順を使用して、入力されたすべての自然数 (数値は 0 まで入力、0 は入力終了の記号) に対して、現在の数値の約数を表示するプログラムを作成します。
<頭> <本体>
# 入力 出力
1 10
5
6
0
1 2 5 10
15
1 2 3 6
Write the program below
#include<iostream>

using namespace std;

// процедура      
// основная программа      

     

Program check result

To check the solution of the problem, you need to register or log in!