Check out example codes for "how to make loop in c++". It will help you in understanding the concepts better.

Code Example 1

//Basic for loop
	int n = 30;
	for(int i = 0; i <n; i++){
	//runs code for 30 times
  	cout << i << " ";
      
	}

Code Example 2

for (int i = 0; i < 5; i++) 
{
  cout << i << "\n";
}

Learn ReactJs, React Native from akashmittal.com