-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (23 loc) · 926 Bytes
/
main.cpp
File metadata and controls
32 lines (23 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "functions.hpp"
#include "classes.hpp"
int main(int argc, char **argv) {
Maths math;
unsigned int max;
for (int i = 0; i < argc; ++i) {
std::cout << "Arg " << i << ": " << argv[i] << std::endl;
}
max = AskMax("You want number of primes lower than? ");
std::cout << "Result: " << FrequencyOfPrimes(max) << std::endl;
max = AskMax("You want max resolution for Pi of? ");
std::cout << "Result: " << Madhava(max) << std::endl;
max = AskMax("You want factorial of? ");
std::cout << "Result: " << Factorial(max) << std::endl;
std::cout << "Current max: " << math.GetMax() << std::endl;
max = AskMax("You want sum of max? " );
math.SetMax(max);
std::cout << "Result: " << math.GetSum() << std::endl;
max = AskMax("You want number of primes lower than? ");
math.SetMax(max);
std::cout << "Result: " << math.GetFrequencyOfPrimes() << std::endl;
return 0;
}