- 1

How to print structure using for loop?

* * * * * * * * * * * * * * * * * * * *

30th Sep 2019, 2:57 PM
Shivanimeena Meena
Shivanimeena Meena - avatar
3 Réponses
0
By printing row by row, column by column. In C++: for (int row = 0; row < 4; ++row) { for (int column = 0; column < 5; ++column) { std::cout << "* "; } std::cout << '\n'; }
30th Sep 2019, 3:17 PM
jtrh
jtrh - avatar
0
Thank you
30th Sep 2019, 3:18 PM
Shivanimeena Meena
Shivanimeena Meena - avatar