Untitled

 avatar
unknown
c_cpp
2 years ago
727 B
5
Indexable
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    int count = 0;
    int oddDevidersCount = 0;
    for (int i = 35000000; i <= 40000000; i++) {
        oddDevidersCount = 0;
        for (int j = 1; j <= sqrt(i); j += 2) {
            if (i % j == 0 && j % 2 != 0) {
                oddDevidersCount++;
            }
        }
        if (oddDevidersCount == 4) {
            //count++;
            //cout << count << ") ";
            cout << i << endl << "\n";
        }
    }



    /*int a, b, c, d;
    float x1, x2;
    cin >> a >> b >> c;
    d = b * b - 4 * a * c;
    x1 = (-b - sqrt(d)) / 2 / a;
    x2 = (-b + sqrt(d)) / 2 / a;
    cout << x1 << ' ' << x2;*/
}
Editor is loading...