Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Find a error in the following program segments and explain how error can be corr

ID: 3553176 • Letter: F

Question

Find a error in the following program segments and explain how error can be corrects. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>

                                        Function addttogether(By Val num1 as integer, num2 as Integer)

                                                        Dim result as integer

                                                        Result = num1 + num2

                                                        End Function.

Find a error and correct it

        Sub printer this (By Val a lists as single)

        Dim alist as single

Console. WriteLine(alists)

End sub

Explanation / Answer


Dear,


Function addttogether(By Val num1 as integer, num2 as Integer) //Function return type missing

      Dim result as integer

      Result = num1 + num2

//need to return Result


End Function.

Corrected code:

Function addttogether(By Val num1 as integer, num2 as Integer) As Integer

      Dim result as integer

      Result = num1 + num2

   return Result

End Function.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote