29 lines
465 B
C++
29 lines
465 B
C++
// euler.cpp : This file contains the 'main' function. Program execution begins and ends there.
|
|
//
|
|
|
|
#include <iostream>
|
|
#include <cassert>
|
|
#include "euler_p1.h"
|
|
|
|
|
|
|
|
void unit_tests() {
|
|
|
|
assert(euler1(10) == 23);
|
|
|
|
std::cout << "All tests passed! continues main." << std::endl;
|
|
}
|
|
|
|
int euler_p1() {
|
|
int res = euler1(1000);
|
|
return res;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
unit_tests();
|
|
|
|
std::cout << "the result for problem 1 = " << euler_p1() << std::endl;
|
|
}
|
|
|