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

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

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

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

View Full Document
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()
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
Ask a homework question - tutors are online