{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Final Cheat Sheet

# Final Cheat Sheet - Option Explicit Sub Mat r ix Dim...

This preview shows pages 1–2. Sign up to view the full content.

Option Explicit Sub Matrix() Dim Original(1 To 100, 1 To 100) As Single, Changed(1 To 100, 1 To 100) As Single, Big(1 To 100) As Single Dim i As Integer, j As Integer, R As Single, C As Single Open ("C:\Users\Cooper \Desktop \Large.txt") For Input As 1 Open ("C: \Users \Cooper \Desktop \LargeOut.txt") For Output As 2 Input #1, i, j For R = 1 To i For C = 1 To j Input #1, Original(R, C) Changed(R, C) = Original(R, C) Big(R) = Original(R, 1) Next C Next R For R = 1 To i For C = 1 To j If (Original(R, C) > Big(R)) Then Big(R) = Original(R, C) Next C Next R For R = 1 To i For C = 1 To i If (Changed(R, C) = Big(R)) Then Changed(R, C) = Changed(R, 1) Changed(R, 1) = Big(R) End If Next C Next R Print #2, "Original Array" For R = 1 To i For C = 1 To j Print #2, Original(R, C), Next C Print #2, Next R Print #2, Print #2, "Switched Array" For R = 1 To i For C = 1 To j Print #2, Changed(R, C), Next C Print #2, Next R Close End Sub Option Explicit Sub Add_Mat() Dim a(1 To 3, 1 To 3) As Double Dim b(1 To 3, 1 To 3) As Double Dim c(1 To 3, 1 To 3) As Double Dim i As Integer, j As Integer On Error GoTo Whoops 'In case you enter text Call Get_Values(a(), b())

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}