Write a Function Average (Num1,Num2) As Float that finds the mean, (Num1 + Num2)/2, of the numbers Num1 and Num2. Write a Main module (main program) that inputs two numbers from the user, calls the Average() function of Exercise 41 to find the mean of these numbers, and displays the result
Main
Declare K As Integer
Input K
Set Result = F(K)
Write Result
End Program
Function F(N) As Integer
If N == 1 Then
Set F = 1
Else
Set F = N * F(N−1)
Set N = N −1
End If
End Function
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here