diff --git a/Screening-Assignment/ksakir486@gmail.com.cpp b/Screening-Assignment/ksakir486@gmail.com.cpp new file mode 100644 index 0000000..c847412 --- /dev/null +++ b/Screening-Assignment/ksakir486@gmail.com.cpp @@ -0,0 +1,64 @@ +/* ksakir486@gmail.com */ +#include +#include +using namespace std; + +int main() +{ + string lines[2000]; + ifstream inFile; + // open the file stream + inFile.open("./shakespeare.txt"); + // check if opening a file failed + if (inFile.fail()) { + cerr << "Error opeing a file" << endl; + inFile.close(); + exit(1); + } + + string line; + int i=0; + while (getline(inFile, line)) + { + lines[i]=line; + i++; + } + inFile.close(); + + +srand(time(NULL)); +int v1 = rand() % 1300; // random number + +for(int i=v1;i elapsed = finish - start; +int totalTimeInSeconds = elapsed.count(); + + +double speed = ((totalChars / totalTimeInSeconds) * 60); + + +cout<<"\n\n\n You have typed total characters are :"<