Question: please reply within 3 hours, thanks #include using namespace std; // Count for '{' and '}' int countChar(string line, char c) { if(c == '{')

please reply within 3 hours, thanks

please reply within 3 hours, thanks #include using namespace std; // Count

#include using namespace std;

// Count for '{' and '}' int countChar(string line, char c) { if(c == '{') return 1; else if (c == '}') return -1; else return 0; }

// Function to remove spaces from the start of the line only string removeSpace(string str) { int iLength = str.length(); for(int i = 0; i

int main() { int iCount = 0, iCount1 = 0; string str, str1[1000]; do { getline(cin, str); // Input from user str = removeSpace(str); // Call to remove start spaces if(str[0] == '}') iCount--; for(int j = 0; j Error found On input: int main() // Hi, I'm a program! int x 1; for(int i = 0; i10; i++) { cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!