Untitled

 avatar
unknown
c_cpp
a year ago
269 B
2
Indexable

#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;
}

Editor is loading...
Leave a Comment