CS Corr of Ass2
CS Corr of Ass2
Function Findsmall(ByVal num1 As Integer, ByVal num2 As Integer, ByVal num3 As Integer) As
Integer
result = num1
Else
result = num2
End If
result = num2
Else
result = num3
End If
result = num3
Else
result = num1
End If
Findsmall = result
End Function
Sub Main()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = Console.ReadLine()
b = Console.ReadLine()
c = Console.ReadLine()
res = Findsmall(a, b, c)
Console.ReadLine()
End Sub
End Module
RESULT:
2.Write a function to calculate the amount of interest earned on an
investment. The amount invested, the interest rate and the number
of years the investment lasts, are to be entered by the user.
RESULT:
CODING:
Module Module1
End Function
Sub Main()
amount_invested = Console.ReadLine()
rate = Console.ReadLine()
time = Console.ReadLine()
Console.ReadLine()
End Sub
End Module