Paste Search Dynamic
CalculatePay
  1. imports System
  2.  
  3. Module mysub
  4.    sub CalculatePay(byref hours as double, byref wage as Decimal)
  5.       'local variable declaration
  6.       dim pay as double
  7.       pay = hours * wage
  8.       Console.WriteLine("Total Pay: {0:C}", pay)
  9.    end sub
  10.    function Calculate() as string
  11.         dim result as string
  12.         result = "Result"
  13.        Console.WriteLine("-------------------------------Pay")
  14.        Return result
  15.    end function
  16.    sub Main(Calculate() as string)
  17.       'calling the CalculatePay Sub Procedure
  18.  
  19.       CalculatePay(25, 10)
  20.       CalculatePay(40, 20)
  21.       CalculatePay(30, 27.5)
  22.       Console.ReadLine()
  23.    end sub
  24. end Module
Parsed in 0.011 seconds