#include <iostream>

using namespace std;


// Function to swap two floats
// The arguments are passed as pointers so that they can be modified.
void swap(float* a, float* b)
{
  float tmp = *a;
  *a = *b;
  *b = tmp;
}

int main()
{
  float a = 1.23;
  float b = 9.876;
  
  cout << "a = " << a << endl << "b = " << b << endl << endl;
  
  swap(&a,&b);
  
  cout << "a = " << a << endl << "b = " << b << endl << endl;
  
  return 0;
}