Updated to initial implementation using cpp.

This commit is contained in:
2026-08-07 13:32:49 +02:00
parent 2eb04509db
commit 78a1607789
32 changed files with 325 additions and 177 deletions

23
Main.h Normal file
View File

@@ -0,0 +1,23 @@
#include <iostream>
#include <chrono>
#include "Exercises.h"
int main()
{
while (true) {
// Input
char input;
cout << "Check(c), test(t) or quit(q) -> ";
cin >> input;
cout << endl;
// action
auto t1 = std::chrono::high_resolution_clock::now();
if (input == 'c') cout << "check result: " << Ex3(13195) << endl;
else if (input == 't') cout << "test result: " << Ex3(600851475143) << endl;
else if (input == 'q') break;
auto t2 = std::chrono::high_resolution_clock::now();
auto duration_ns = std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
cout << "Duration = " << duration_ns << " microseconds" << endl;
}
}