(c) Mr. Jamal intends to write a C++ program where the numbers 1, 2, 3, 4 and 5 will be printed three times, respectivel
Posted: Sat Jul 09, 2022 11:47 am
(c) Mr. Jamal intends to write a C++ program where the numbers 1, 2, 3, 4 and 5 will be printed three times, respectively. However, he found some difficulties in executing his program. Detect and correct the error(s) in the C++ program given in Figure 1 so that Mr. Jamal can produce the desired output, as shown in Figure 2. #include using namespace stg; int main() [ int a = 1; do { SSS5AA WWW NNZLLE return 0; ] int b= 1; do { cout << a << "\n"; b++; } while (b 3); a++; while (a <5) Figure 1: Mr. Jamal's C++ program. Figure 2: Sample run of the program.