IE 148 homework 4

IE 148 homework 4 - 9 * 5 Tyler Fox IE 148 HW 4 Problem 1...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 9 * 5 Tyler Fox IE 148 HW 4 Problem 1 A. S J 1 0 = S + 1 1 5 S = 1 + 4 4 Message box would show S as 12 S = 5 + 7 7 B. S = 0 For K = 1 to For M = 2 to 10 Step 2 steps total S = S + 1 Next M Next K 9*5 = Message box would show S as 45 MsgBox(S) C. S New S Tyler Fox IE 148 HW 4 S = 0 + 1 1 1 S = 1 + 1 2 2 S = 2 + 1 Message box would show S as 3 D. S J X X = 2 * J S = S + 4 * X J = J + J ^ 2 3 2 X = 2*3 S = 0 + 4*6 J = 3 + 3^2 24 12 6 X = 2*12 S = 24 + 4*24 J = 12 + 12^2 120 156 12 Message box would show S as 120 Problem 2 Sub myprog() Dim A(100) As Integer, i As Single, sum As Single, gm As Single Tyler Fox IE 148 HW 4 Open "U: \DATA.DAT" For Input As 1 Do While Not EOF(1) i = i + 1 Input #1, A(i) sum = sum + A(i) Loop gm = sum ^ (1 / i) gm = Round(gm, 2) Close 1 MsgBox ("geometric mean= " & gm) End Sub Tyler Fox IE 148 HW 4 Problem 3 Sub myprog() Dim A(3 To 10, 1 To 20) As Single, Row As Integer, Column As Integer, sum As Single, Avg As Single, Percent(10, 20) As Single, n As Single, s As Single...
View Full Document

Page1 / 6

IE 148 homework 4 - 9 * 5 Tyler Fox IE 148 HW 4 Problem 1...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online