was wondering how do I output the numbers i just swapped in my function to the screen, its only outputting the first number imputed by the user for example if the user enters in 3,4 it outputs 3 for the numbers swapped.
#include "stdafx.h"
usingnamespace std;
int one;
int two;
int x;
int swap(int one, int two);
int main()
{
cout << "Enter two integer values ";
cin >> one >> two;
cout << "the numbers entered = " << one << two << "/n";
cout << "the numbers swapped = " << swap(one,two);
return 0;
}
int swap(int one, int two)
{
x = two; // x = 0 one = 2 two = 5, // x = 5 two = 2 one = 5
two = one;
one = x;
return one,two;
}