This content originally appeared on DEV Community and was authored by Sanjar Rashidov
for loop while loop bilan bir xil. Faqatgina yozilishida ozgina farq qilinadi.
Syntax of for loop:
for(initialization; condition; ++/--)
{
statement
}
Masalan:
#include <iostream>
using namespace std;
int main()
{
for(int n = 1; n <= 7; n++)
{
cout << n << endl;
}
return 0;
}
for loopdagi o'zgaruvchi for loopdan tashqarida ishlamaydi!
This content originally appeared on DEV Community and was authored by Sanjar Rashidov
Sanjar Rashidov | Sciencx (2024-11-02T11:15:15+00:00) for loop. Retrieved from https://www.scien.cx/2024/11/02/for-loop-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.