This content originally appeared on DEV Community and was authored by Sanjar Rashidov
Nested while loop - while loop ichida yana boshqa while loop ishlatish.
Syntax of nested while loop:
while(condition)
{
while(condition)
{
statement
++/--
}
statement
++/--
}
Masalan:
#include <iostream>
using namespace std;
int main()
{
int n = 1;
while(n <= 1)
{
while(n <= 7)
{
cout << n << endl;
n++;
}
cout << endl;
n++;
}
return 0;
}
This content originally appeared on DEV Community and was authored by Sanjar Rashidov
Sanjar Rashidov | Sciencx (2024-11-02T10:55:51+00:00) Nested while loop. Retrieved from https://www.scien.cx/2024/11/02/nested-while-loop/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.