From 2187d739802e5e0b587982ee19ddf1b356f00f53 Mon Sep 17 00:00:00 2001 From: sabasultana230 <59612715+sabasultana230@users.noreply.github.com> Date: Sun, 6 Sep 2020 14:51:46 +0530 Subject: [PATCH] Add files via upload --- .../typing-speed-sabasultana.cpp | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Screening-Assignment/typing-speed-sabasultana.cpp diff --git a/Screening-Assignment/typing-speed-sabasultana.cpp b/Screening-Assignment/typing-speed-sabasultana.cpp new file mode 100644 index 0000000..6372afe --- /dev/null +++ b/Screening-Assignment/typing-speed-sabasultana.cpp @@ -0,0 +1,63 @@ +//saba.sultana230@gmail.com +//Saba Sultana + +#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<