Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Module Program
- Public Function computeY(x as Long) As Long
- If x > 1 Then
- return x * x
- ElseIf x >= 0 And x <= 1 Then
- return x
- ElseIf x < 1 Then
- return -2 * x
- End If
- End Function
- Public Sub Main(args() As string)
- Dim x as Long = 2
- Dim y as Long = computeY(x)
- Console.WriteLine(y)
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement