ok so I have
#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
void swap ( int &x, int &y);
int main()
{
int number;
cout << "x is ";
cin >> number;
int x = number;
cout << "y is ";
cin >> number;
int y = number;
swap( x, y);
cout << "Swapped the first number is now(" << x << ")and the second is now (" << y << ")";
return 0;
}
and i am just trying to get it to swap them with no avail any and all help would be greatly appreciated
#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
void swap ( int &x, int &y);
int main()
{
int number;
cout << "x is ";
cin >> number;
int x = number;
cout << "y is ";
cin >> number;
int y = number;
swap( x, y);
cout << "Swapped the first number is now(" << x << ")and the second is now (" << y << ")";
return 0;
}
and i am just trying to get it to swap them with no avail any and all help would be greatly appreciated