#include <cstdlib>
#include <iostream>
using namespace std;

/*****
    signature: ugly_funct: int -> int
    purpose: expects an integer and returns
        the value that is 30 more than that given
	integer

    examples:
        ugly_funct(3) == 33
        ugly_funct(2) == 32

    by: Sharon Tuttle
    last modified: 2016-12-08
*****/

int ugly_funct(int value)
{
    value += 30;

    return value;
}

/******
     signature: main: void -> int

     purpose: to demo how changing a pass-by-value
         parameter (which by the way is POOR STYLE
	 because it is potentially confusing)
	 does NOT change the corresponding argument
   
     examples: when this is run, it should print
         to the screen the value of a local variable
	 before AND after it is used as an argument to
	 ugly_funct

BEFORE call, local_num is: 84
calling ugly_funct(local_num): 114
AFTER call, local_num is: 84

*****/

int main()
{
    int local_num = 84;

    cout << "BEFORE call, local_num is: " << local_num << endl;

    cout << "calling ugly_funct(local_num): " 
         << ugly_funct(local_num) << endl;

    cout << "AFTER call, local_num is: " << local_num << endl;
  
    return EXIT_SUCCESS;
}