Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 03 / PrintEvenNumbers.cpp
blob: e9a2231d90e44fd39986214742403b4f25a170ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	
	int j = 0;
	while (j <= n)
	{
		cout << j << endl;
		j += 2;
	}
	
	//Here the variable j is reachable! 


	for (int i = 0; i <=n; i++)
	{
		cout << i << endl;
	}
	// Here the variable i is NOT reachable.


}