Building upon exercise 1, we are now going to modify the main method so we can pass values to the executable. 1. If mathexe.c is not open, press Shift-Ctrl-r and type in "mathexe.c" to open it. Highlight the 4 printf lines. Right-click and select Surround With->for - for loop with temporary variable. In the for loop, change 'max' to 'argc' and change 0 (the lower limit of the for loop's iterator) to be 1. Leave the loop iterator named 'var'. 2. Now we want to convert our input arguments from strings to doubles so we can pass them as arguments to our functions. Add the following line immediately inside the for loop: double x = strt. Now press Ctrl-Space to fill in the strtod function. Make the first argument 'argv[var]' and the second argument NULL (ie. double x = strtod(argv[var], NULL); <-- don't forget the semi-colon!). Highlight the call to strtod and press Ctrl-Shift-n. This should add an include statement for stdlib.h which declares strtod(). 3. Save mathexe.c and build the mathexe project. You will get an error in the Console view. A red x icon will also appear in the margin of the mathexe.c editor. You can hover over the red x icon in the margin of mathexe.c to see the error. The Console View and Problems View also show the same error. The error occurs because declaring var as an int inside the for loop is not supported by the default C standard. You either have to pass a parameter to let the compiler know you are adhering to the C99 standard or else change the code to declare the variable outside the loop. To add the parameter, ensure the mathexe project is selected in the Project Explorere view and go to Project->Properties->C/C++ Build->Settings. Select the entry for the compiler ("GCC C Compiler" or "Cross GCC Compiler")->Miscellaneous" and add "-std=c99" (without the quotes) in the "Other flags" entry box. Remember to leave a blank ahead of this option. Press OK to save your options. Rebuild the project to verify that the error goes away. Note that a warning remains for the unused variable 'x' outside the for loop. Remove this line and rebuild mathexe. 4. Right click the mathexe project and select "Run As"->"Run Configurations...". When the mathexe run configuration (under C/C++ Application) is selected, you should see a tab named "Arguments". Go to that tab and enter (without the quotes) "1.1 2.2 3.3 -4.5" into the Program arguments text box. These are program parameters that will be read into the argv parameter passed to the main function. The main function in turn converts these strings to double and passes them to the math functions in mathlib. Press the "Run" button. 5. Hold your cursor over ceil(), floor(), and square() functions in mathexe.c. Notice how there is documentation for ceil() and floor() but not for the square() function. This is because ceil() and floor() are part of the glibc library for which we have hover help installed. Since it is not a good idea to use these names, we will rename them. For both ceil and floor, highlight the function call in mathexe.c, right click and choose Refactor->Rename. Rename them to be myceil and myfloor respectively. Notice how mathexe.c, mathlib.h, and mathlib.c are all changed to reference the new names. 6. Rebuild the mathexe project which will trigger a build of the mathlib project as it is a referenced project. Re-run mathexe via the Run Configuration you created earlier.