#include #include #include #include using namespace std; int main(int argc, char *argv[]) { clock_t t_begin = clock(); float CPU = 2.26; // put your CPU frequency here in GHz // default file name string fileName = "D:\\Teaching\\Proposals\\BSc-CS-IntroductionToTheoryOfComputability\\2-Projects\\Project1\\2600-0-no-accents.txt"; if (argc > 1) { fileName = argv[1]; } ifstream novel(fileName.c_str()); // openning the fiie int lineNo = 0; // indicates the line number string line; // indicates the line contents while (getline(novel, line)) { // put your code here lineNo++; // now, I have read a line, so I increase it. We start line numbers from 1 cout << lineNo << "\t" << line << endl; } clock_t t_end = clock(); double time = double(t_end - t_begin) / CLOCKS_PER_SEC * 1000; cout << "Total runtume in milliseconds: " << time << "\n" << "Your score of runtime is " << time * CPU << endl; cin.get(); return 0; }