Function powIT(ByVal a, ByVal b) 'function to calculate a to the power of b using iteration 'function has two inputs (a,b) and one output (y) 'b must be a positive integer Dim y As Double 'The answer (y) might be big so we should use 'Double instead of Integer Dim count1 As Integer y = 1.0 count1 = 0 Do While count1 < b y = y * a count1 = count1 + 1 Loop Return y 'You MUST include a Return statement in every function End Function