From cd1c9f2c531f298d680895ddb7ddd96aa504fe0a Mon Sep 17 00:00:00 2001 From: mlsulekhiya <44512130+mlsulekhiya@users.noreply.github.com> Date: Sat, 12 Oct 2019 22:55:59 +0530 Subject: [PATCH] included format and vector library boosts --- Chapter 1/1.5.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Chapter 1/1.5.cpp b/Chapter 1/1.5.cpp index 193c29f..9300a36 100644 --- a/Chapter 1/1.5.cpp +++ b/Chapter 1/1.5.cpp @@ -1,5 +1,6 @@ #include #include +#include using namespace std; @@ -17,13 +18,13 @@ void replaceSpaces(string &s){ int main(){ - int t; + int t=0; cin >> t; while (t--){ - string s; - getline(cin, s); - replaceSpaces(s); - cout << s << endl; + string s; + getline(cin, s); + replaceSpaces(s); + cout << s << endl; } return 0; }