Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int a, b;
- cout << "Введите начало диапазона: ";
- cin >> a;
- cout << "Введите конец диапазона: ";
- cin >> b;
- for (int i = a; i <= b; i++) {
- cout << "Делители числа " << i << ": ";
- for (int j = 1; j <= i; j++) {
- if (i % j == 0) {
- cout << j << " ";
- }
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment