/* Reviewing Data Types! 
 * First off, the integers.  */
int marksAge = 18;

/* And then the character.  */
char geoffsGender = 'M';

/* Finally, the floating-point numbers.  */
double alicesHeightInInches = 67.1;

/* Intro to Functions.
 * Think of functions like you would the functions
 * in calculus. Take f(x) = 2*x + 1, for example.  */
 
/* All functions start with the function signature.
 * This first line specifies what the name of the 
 * function is, what variables it will take in, and
 * what type of data it will return.  
 *
 * The general format of the signature is:
 *    <return type> <function name> ( <parameters> )
 * 
 * "Parameters" is another way of saying "input values".
 */
int f(int x) { 
   return x*2 + 1;  
}

/* The following function takes in a double height
 * value, and returns the equivalent height in
 * centimetres.  */
double convertInchesToCentimetres(double heightInInches) {
   /* create a temporary variable to store the
    * height in centimetres.  */
   double tempHeight;
   /* convert the input height and store it in
    * our temporary variable.  */
   tempHeight = heightInInches*2.54;
   /* return the converted height to whoever
    * called this function.  */
   return tempHeight;
}

/* The following function calculates the area of a 
 * rectangular surface, given the height and width 
 * of this surface.  */
double calculateArea(double height, double width) {
   return height*width;  
}
 
int main() {
   double imperialHeight = 67.1;
   double metricHeight = convertInchesToCentimetres(imperialHeight);  
   return 0;
}

/* When a function doesn't need to take in any values, 
 * just leave the parentheses empty. When it doesn't need
 * to return a value, the return type is "void".  */
