U E D R , A S I H C RSS

데블스캠프2006/화요일/pointer/문제1/주소영

No older revisions available

No older revisions available



주소영

1번 문제
~cpp

#include<iostream>
using namespace std;
void swap(int *a, int *b);

int main()
{
	int a=1, b=18 ;
	
	cout << a << "\t " << b << endl;

	swap(&a, &b);
	cout<<a << "\t" << b<<endl;



	return 0;
}

void swap(int *a,int *b)
{
	int c;
	c=*a;
	*a=*b;
	*b=c;
}


DeleteMe) 문제 페이지를 나눠서 만들어주세요^^; -상욱
----
데블스캠프2006/화요일/pointer
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:06
Processing time 0.0206 sec