From 2b21cd21151396bc67154a255ee803ef23d22735 Mon Sep 17 00:00:00 2001 From: SyedaNawazAhmadi <62463914+SyedaNawazAhmadi@users.noreply.github.com> Date: Sun, 6 Sep 2020 16:25:51 +0530 Subject: [PATCH] Add files via upload --- .../typing-speed-syedanawazahmadi.cpp | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Screening-Assignment/typing-speed-syedanawazahmadi.cpp diff --git a/Screening-Assignment/typing-speed-syedanawazahmadi.cpp b/Screening-Assignment/typing-speed-syedanawazahmadi.cpp new file mode 100644 index 0000000..4c95eb6 --- /dev/null +++ b/Screening-Assignment/typing-speed-syedanawazahmadi.cpp @@ -0,0 +1,63 @@ +//syedanawazahmadi@gmail.com +//Syeda Nawaz Ahmadi + +#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<