+ 3
I want to understand the logic of (nested for loop) in c++ ..😊
cpp for
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";
}
+ 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
........
وقع ليك 😂