U E D R , A S I H C RSS

데블스캠프2006/화요일/pointer/문제1/이장길

~cpp
#include <iostream.h>

void swap(int *, int *);

void main()
{
	int a = 1, b = 18;

	cout << "a = " << a;
	cout << "b = " << b << endl;

	swap(&a,&b);
	
	cout << " swap후 a = " << a;
	cout << " swap후 b = " << b << endl;

}

void swap(int *n, int *m)
{
	int save;

	save = *n;

	*n = *m;
	*m = save;

}


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:06
Processing time 0.0089 sec