HW#3 - Option Explicit Sub HWset3() 'Problem #1 'Program to...

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

View Full Document Right Arrow Icon
Option Explicit Sub HWset3() 'Problem #1 'Program to convert degrees Fahrenheit to degrees Celsius, Rankine, and Kelvin ' HWset3 Macro ' Macro created 9/24/2006 by Jessica Tobelmann Dim x As Single, y As Single, z As Single, A As Single Open ("C:\Documents and Settings\Jessica Tobelmann\Desktop\output values.txt") For Output As 1 Print #1, "F", "C", Print #1, "__", "__", For x = 30 To 210 Step 20 y = (5 / 9) * (x - 32) Print #1, x, y Next x Print #1, "F", "R" Print #1, "__", "__", For x = 30 To 210 Step 20 z = x + 459.67 Print #1, x, z Next x Print #1, "F", "K" Print #1, "__", "__", For x = 30 To 210 Step 20 A = (5 / 9) * (x - 32) + 273.15 Print #1, x, A Next x Close End Sub Option Explicit Sub HWset32() ' Problem #2 ' HWset3 Macro ' Macro created 9/24/2006 by Jessica Tobelmann
Background image of page 1

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

View Full DocumentRight Arrow Icon
Dim n As Single, sum As Single, i As Integer n = InputBox("Input the value for n. Must be a positive number, equal to or greater than three") sum = 0 Do If (n < 3) Then n = InputBox("Please re-enter the value") Else: Exit Do End If Loop For i = 1 To n Step 2 sum = sum + i Next i If (n / 2 = n \ 2) Then sum = sum + n End If End Sub Sub HWset33()
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 03/26/2008 for the course ENGR 160 taught by Professor Sengupta during the Fall '07 term at Iowa State.

Page1 / 6

HW#3 - Option Explicit Sub HWset3() 'Problem #1 'Program to...

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

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