• Testing: Large inputs for recursion limits; verify swapped values.

  • Symptom: result = 7/2 gives 3.5, but result = 7\2 gives 3. Fix: In VB.NET, / returns a Double. \ returns an Integer after rounding. For precise division in BCA lab reports, use CDec() or convert to double first.

    Author: [Institutional Affiliation] Course: Bachelor of Computer Applications (BCA) Subject: Visual Programming using VB.NET

    Example (Fixed Prime Check):

    Function IsPrime(n As Integer) As Boolean
        If n < 2 Then Return False
        For i As Integer = 2 To Math.Sqrt(n)
            If n Mod i = 0 Then Return False
        Next
        Return True
    End Function