Project Euler Q3
unknown
c_cpp
3 years ago
354 B
10
Indexable
#include <iostream> using namespace std; int main() { // 600.851.475.143 long long int n = 13195; long int max; for (int x; x < n; x++){ //cout << x << endl; if (n % x == 0){ if (x > max){ max = x; } } } cout << endl << max; return 0; }
Editor is loading...