(a) Please draw the output pattern. (b) Please replace the 1st while loop to for loop (line 13 – 17) and make sure the p

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

(a) Please draw the output pattern. (b) Please replace the 1st while loop to for loop (line 13 – 17) and make sure the p

Post by answerhappygod »

A Please Draw The Output Pattern B Please Replace The 1st While Loop To For Loop Line 13 17 And Make Sure The P 1
A Please Draw The Output Pattern B Please Replace The 1st While Loop To For Loop Line 13 17 And Make Sure The P 1 (69.81 KiB) Viewed 37 times
(a) Please draw the output pattern. (b) Please replace the 1st while loop to for loop (line 13 – 17) and make sure the program still works properly. (5 + 5 = 10 points) #include <iostream> 5 using namespace std; sint main() { 4 int row - 4, digit = 0; 6 7 8 9 10 11 12 13 14 15 16 17 for (int i = 1; i <= row; i++) { -D int j = 1; while (j <- row - i) { cout << " "; j++; } 18 int k = }} while (k <= row) { cout << digit; k++; } 19 20 21 22 23 24 25 26 27 28 29 30 digit++; cout << endl; } cout << endl; system("pause"); return; }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply