How many asterisks will be output by the following code? for (int i = 1; i < n; ++i) { for (int j = 1; j < m; ++j) { cou

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

How many asterisks will be output by the following code? for (int i = 1; i < n; ++i) { for (int j = 1; j < m; ++j) { cou

Post by answerhappygod »

How many asterisks will be output by the following code? for
(int i = 1; i < n; ++i) { for (int j = 1; j < m; ++j) {
cout << "*"; }
}
a. n
b. m
c. n + m
d.n*m
e.(n-1)+(m-1)
f.(n-1)*(m-1)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply