[SOLVED] Algorithm Workbench (Visual Basic 2013/2015)

21.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (4 votes)

Algorithm Workbench (Visual Basic 2013/2015)

1.) The following statement calls a function named half that returns a Decimal, which is half of the argument. Write the function.

decResult = Half (intNumber)

2.) An application contains the following function:

Function Square (ByVal intValue As Integer) As Integer

Return intValue ^ 2

End Function

3.) Write a procedure named TimesTen that accepts a single Integer argument. When the procedure is called, it should display the product of its argument multiplied by 10 in a message box.

4.) An application contrains the following procedure:

Sub Display(ByVal intArg1 As Integer, ByVal strArg2 As String, ByVal sngArg3 As Single)

MessageBox.Show (“Here are the values: ” &

intArg1.ToString() & ” ” &

strArg2 & ” ” & sngArg3.ToString() )

End Sub

Write a statement that calls the procedure and passes it the following variables:

Dim strName As String

Dim intAge As Integer

Dim sngIncome As Single

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.