Skip to content

Instantly share code, notes, and snippets.

@kdmkdmkdm
Created April 25, 2012 11:43
Show Gist options
  • Select an option

  • Save kdmkdmkdm/2489118 to your computer and use it in GitHub Desktop.

Select an option

Save kdmkdmkdm/2489118 to your computer and use it in GitHub Desktop.
variableScope3.8.cpp
// variableScope3.8.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
using namespace std;
int main()
{
int cnt;
for(int i = 0; i < 5; ++i)
{
cout << "Hello, World!" << endl;
++cnt;
}
cout << "cnt = " << cnt << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment