From 919afc3dbf57416657cefa6f3418bbe13265e806 Mon Sep 17 00:00:00 2001 From: Bushra Baseer <54860267+bushrabaseer@users.noreply.github.com> Date: Sun, 6 Sep 2020 13:28:06 +0530 Subject: [PATCH] Add files via upload --- .../typing-speed-bushrabaseer.cpp | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Screening-Assignment/typing-speed-bushrabaseer.cpp diff --git a/Screening-Assignment/typing-speed-bushrabaseer.cpp b/Screening-Assignment/typing-speed-bushrabaseer.cpp new file mode 100644 index 0000000..4a29cf4 --- /dev/null +++ b/Screening-Assignment/typing-speed-bushrabaseer.cpp @@ -0,0 +1,63 @@ +//bushrabseer1299@gmail.com +//Bushra Baseer + +#include +#include +#include +#include +#include +#include + +using namespace std; + +int main(){ + + int r; + std::ifstream infile("shakespeare.txt"); + std::string line; + string lines[2000]; + +if (infile.is_open()){ //checking whether the file is open + + int i=0; + while(getline(infile,line)){ //read data from file object and put it into string. + + lines[i]=line; + //cout<