/*
#include<stdio.h>
int* f() {
int arr[10];
int *pArr = arr;
int i;
printf("\n\n");
for(i=0; i<10; i++) {
arr[i] = (10-i) * (10-i);
printf("%d ", &arr[i]);
}
printf("\nfunc's arr address : %d\n", arr);
return pArr;
}
int main() {
int *pArr;
int *pInt;
char p;
char *pChar;
int arr[1000] = {0};
int i, j, n;
int **dArr;
int tDarr[10][10];
dArr = tDarr;
pInt = &n;
scanf("%d", &n);
printf("%d\n", n);
printf("%d\n\n", *pInt);
for(i=0; i<10; i++) {
arr[i] = i*i;
}
pArr = arr;
printf("%d %d\n\n", arr, pArr);
for(i=0; i<10; i++){
printf("[%d] ", *(pArr+i));
}
pArr = f();
printf("main's pArr address : %d\n", pArr);
for(i=0; i<10; i++) {
printf("[%d] ", (pArr+i));
}
}
*/
/*
#include<stdio.h>
int main()
{
int n[100]={0};
int i;
int a, k;
scanf("%d", &a);
for(i=0; i<a-1; i++)
{
scanf("%d", &k);
n[k]=1;
}
for(i=1; i<=a; i++)
{
if(n[i]==0)
{
printf("%d", i);
}
}
}
*/
/*
#include <iostream>
using namespace std;
class student {
public:
string name;
int grade;
int korean;
int english;
int math;
int sci;
int history;
student(); // const
int introduce();
};
student::student() {
// initialized
grade = 1;
}
student::introduce() {
cout << "introduce";
}
int main() {
student chungsim;
student yongin[100];
cout << &yongin[1] ;
}
*/
/*
#include <iostream>
using namespace std;
class student {
public:
int print();
};
student::print() {
return 10;
}
class yongin : public student{
public:
int k;
int print();
};
yongin::print() {
return 20;
}
int main() {
student st;
yongin yi;
cout << st.print();
}
*/
/*
#include<iostream>
using namespace std;
class spca
{
public:
int a;
int b;
int c;
int d;
int sum;
spca();
int calc();
};
spca::spca() {
sum = 0;
}
spca::calc() {
//int sum = 0;
for(int i=a; i<=b; i++)
{
if(i%2==0){
cout << "-" << i;
sum -= i;
}
else{
if(i==a) {
cout << i;
}
else
cout << "+" << i;
sum += i;
}
}
//sum <<
}
int main()
{
spca s;
cin >> s.a >> s.b;
s.calc();
if(s.sum >0){
cout << "=" << "+" << s.sum;
}
else {
cout << "=" << s.sum;
}
}
*/
/*
#include <iostream>
void message()
{
std::cout << "Within function ::message()\n";
}
namespace A
{
using namespace std;
void message()
{
cout << " Within function A::message()\n";
}
}
namespace B
{
using std::cout;
void message(void);
}
void B::message(void)
{
cout << " Within function B:: message()\n";
}
int main()
{
using namespace std;
using B::message;
cout << "Testing namspace!\n";
cout << "\nCall of A::message()\n" << endl;
A::message();
cout << "\nCall of B ::message()" << endl;
message();
cout << "\nCall of::message()" << endl;
::message();
return 0;
}
*/
#include <iostream>
#include <iomanip>
using namespace std;
int var = 0;
namespace Special
{
int var = 100;
}
int main()
{
int var = 10;
cout << setw(10) << ":" <<var;
{
int var = 20;
cout << setw(10) << var << endl;
{
++var;
cout << setw(10) << var;
cout << setw(10) << ++ ::var;
cout << setw(10) << Special::var * 2
<< endl;
}
cout << setw(10) << var - ::var;
}
cout << setw(10) << var << endl;
return 0;
}