/* C++ Programming, Program (a), Exercise 3, Sheet 4  */

/* Author: Rob Miller and William Knottenbelt
   Program last changed: 30th September 2023    */

#include <iostream>
using namespace std;

int main() 
{
	int count = 1;
	for (; count <= 5 ; count++)
	{
		int count = 1;
		cout << count << "\n";
	}	
	return 0;
}


/* This program finishes after printing five '1's on the screen. The output is:

1
1
1
1
1

This is because the "count" in "count <= 5" and in "count++" refers to the 
variable declared outside the scope of the "for" loop (and not to the one 
declared inside).

*/ 
