Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Module Program
  2.         Public Function computeY(x as Long) As Long
  3.             If x > 1 Then
  4.                 return x * x
  5.             ElseIf x >= 0  And x <= 1 Then
  6.                 return x
  7.             ElseIf x < 1 Then
  8.                 return -2 * x
  9.             End If
  10.         End Function
  11.    
  12.         Public Sub Main(args() As string)
  13.             Dim x as Long = 2
  14.             Dim y as Long = computeY(x)
  15.            
  16.             Console.WriteLine(y)
  17.         End Sub
  18. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement