#include #include #include using namespace std; void showstat( int curr ); int main() { double monthlySalary = 1800.50; /*write a method called "increaseSalary" that takes monthlySalary and increases it by 10% (multiplies by 1.1) But make sure you pass monthlySalary by reference, not by value! */ cout << "monthlySalary is " << monthlySalary; increaseSalary(monthlySalary); cout << " and now monthlySalary is " << monthlySalary << " and it should be " << 1980.55 << endl; //what is the output of the following? Try to guess before you put it into Visual Studio and run it. for ( int i = 0; i < 5; i++ ) showstat( i ); const int arraySize = 8; int array[arraySize] = {9, 8, 7, 6, 5}; //write a for loop to go through and print all of the elements of the above array /*write a function that takes an integer array as an argument and multiples each element by 3. Then pass the variable "array" above to that function. Don't use pointers! */ /*write a function increaseSalary2 that has the same functionality as the above increaseSalary function, but it takes a pointer to a double instead of a reference. Create a pointer to the increaseSalary variable and pass it to the function, printing the result afterwards. */ int *arrayPtr = array; //use the arrayPtr to loop through the array and print the elements of the array (without using [ ]) return 0; } void showstat( int curr ) { static int nStatic; nStatic += curr; cout << "nStatic is " << nStatic << endl; }