Functions

  1. Click on the square to define a function for calculating the area of a square.
  2. Similarly define functions for the other geometrical figures
  3. The defined functions are shown in the middle window
  4. Now do appropriate function calls in the main program to compute the area of the figure displayed
  5. Press execute to execute the code and see the output

Manual

In this experiment you will learn how to write functions and how to call them with proper arguments.