-
Notifications
You must be signed in to change notification settings - Fork 0
/
connector.h
51 lines (32 loc) · 1.09 KB
/
connector.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef AOP_UEBUNGEN_CONNECTOR_H
#define AOP_UEBUNGEN_CONNECTOR_H
#include <vector>
#include <string>
#include <cmath>
namespace global
{
void Menu();
enum MenuChoice
{
AOP, EULER, BOTH
};
}
namespace service
{
std::vector<unsigned long long int> yieldPrimes(unsigned long long int maxValue);
unsigned long long int reverseNumber(unsigned long long int num, unsigned short int base = 10);
bool isStringAInt(const std::string &input);
bool isStringADouble(const std::string &input);
unsigned long long int parseIntFromString(const std::string &input);
bool isPrime(unsigned long long int numberToCheck);
unsigned long long int getFactorial(unsigned short int number);
double getUserInputDouble(std::string &message);
unsigned long long int getUserInputInteger(std::string &message);
double ModuloPi(double input);
}
namespace repository
{
void writeVectorToFile(std::vector<unsigned long long int> vectorToSafe, std::string fileName);
std::vector<unsigned long long int> readPrimesFromFile();
}
#endif //AOP_UEBUNGEN_CONNECTOR_H