-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (32 loc) · 1021 Bytes
/
Copy pathmain.cpp
File metadata and controls
39 lines (32 loc) · 1021 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
33
34
35
36
37
38
/*
* File: main.cpp
* Author: Nick Soetaert
*
* Created on March 5, 2018, 1:06 PM
*/
#include <cstdlib>
#include <iostream>
#include <fstream>
#include "CalculateSingleIteration.h"
using namespace std;
int main(void) {
int iterations;
string seed, filename;
cout << "Please enter your seed number" << endl;
cin >> seed;
cout << "Please enter the number of iterations you would like to calculate" << endl;
cin >> iterations;
cout << "And finally, please enter your output file name." << endl;
cin >> filename;
filename = filename + ".txt";
ofstream outputStream;
outputStream.open(filename);
outputStream << "Seed number : " << seed << endl;
outputStream << "Numeber of iterations: " << iterations << endl;
outputStream << "0:" << "\t" << seed << endl;
for(int i = 0; i < iterations; i++){
outputStream << (i+1) << ":" << "\t" << CalculateSingleIteration(seed, filename) << endl;
}
outputStream.close();
return 0;
}