Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
269 B
0
Indexable
Never

#include <iostream>
#include <string>
using namespace std;

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

int main()
{
	int x = 5;
	int y = 10;
	cout << x << y << endl;

	swap(x, y);

	cout << x << y << endl;
	
	return 0;
}

Leave a Comment