// demoSmaller.cc P. Conrad  2/25/2005
// for CISC181, Spring 2005
// demonstrate functions to find smaller of two ints
// and demonstrate function to find smallest of three ints

#include <iostream>
using namespace std;

int smaller(int a, int b); // return the smaller of a and b

int smallest(int a, int b, int c); // return the smallest of a, b, c

int foobarfum(int y, float z, char fumbar); // a figment of my imagination
int foobarfum(int y, float z, char fumbar); // a figment of my imagination
int foobarfum(int y, float z, char fumbar); // a figment of my imagination

int main (void)
{ 
  int x, y, z;

  // prompt user for input 

  cout << "Enter three integer values (for x, y, z):";
  cin >> x >> y >> z;

  // echo back input to user
  cout << "x=" << x << " y=" << y << " z=" << z << endl;

  // print results

  cout << "The smaller of x and y is: " << smaller(x,y) << endl;
  cout << "The smaller of y and z is: " << smaller(y,z) << endl;
  cout << "The smallest of x, y, z is: " << smallest(x, y, z) << endl;

  return 0;
} 

// can you rewrite this one without using "if"?
int smaller(int a, int b)
{
  if (a<b)
    return a;
  else
    return b;
}

// finish the body of this one
int smallest(int a, int b, int c)
{
  // @@@ THIS FUNCTION NOT FINISHED YET
  // @@@ FINISH IN LECTURE
  
  return 0; // temporary return statement as placeholder
}

void eatDessert(void);

int haveLunch(int imHungry)
{
  int eatSandwich;
  
  eatDessert();

  return 0;

}









