+ 3

I want to understand the logic of (nested for loop) in c++ ..😊

cpp for

1st Aug 2017, 3:20 PM
Motwkel Mohammed
Motwkel Mohammed - avatar
3 odpowiedzi
+ 12
// Run this code and you will understand. for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { std::cout << "Value of i : " << i << std::endl; std::cout << "Value of j : " << j << std::endl; } std::cout << "\n"; }
1st Aug 2017, 3:48 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
the outer loop depends on the inner loop....when the inner loop complete all his rounds the outer loop complete just one round ....when you want to write a programme the outer loop specify the number of lines ........ وقع ليك 😂
3rd Aug 2017, 9:14 AM
Aomaf
Aomaf - avatar