/*Group members:
Saharulnizam Hakimy bin Shobri
A19EC0205
Chee Wai Lum
A19EC0032*/
#include<iostream>
using namespace std;

//fx prototype
void swap(float&, float&);

int main(){
	
	float first, second;
	
	//key in first value
	cout<<"Enter the first number\n";
	cin>>first;
	//key in scond value
	cout<<"Enter the second number\n";
	cin>>second;
	
	cout<<"You input the numbers as "<<first<<" and "<<second<<endl;
	
	swap(first, second);
	
	cout<<"After swapping, the first number has the value of "<<first<<" which was the value of the second number\n";
	cout<<"The second number has the value of "<<second<<" which was the value of the first number";
	
	return 0;
}

void swap(float& number1, float& number2){
	float number3;
	number3=number1;
	number1=number2;
	number2=number3;	
}
