#include using namespace std; int main(){ int array[] = {5, 7, 9, 11, 13}; int i = 0; do { cout << array[i] << " "; i++; } while(i < 5); cout << "\n"; int j = 0; while(j < 5){ cout << array[j] << " "; j++; } cout << "\n"; for(int k = 0; k < 5; k++) cout << array[k] << " "; cout << "\n"; // at this point, we have i and j but not k because it's out of scope // Only C++11 and later for(int number : array) cout << number << " "; cout << "\n"; // This is not a favored way to make a loop int m = 0; top_of_loop: cout << array[m] << " "; m++; if(m < 5) goto top_of_loop; cout << "\n"; return 0; }