Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

INTERSCHIMBARE

// interschimbare.cpp : Defines the entry point for the console application.


//

#include "stdafx.h"
#include<iostream>
#include<conio.h>

using namespace std;

void interschimba(int *a, int *b)


{
int aux = *a;
*a = *b;
*b = aux;
}

int _tmain(int argc, _TCHAR* argv[])


{
int x = 2, y = 3;
interschimba(&x, &y);
cout<< x << " " << y;

getch();
return 0;
}

You might also like