|
Hi!
I am having a problem grasping how to pull the data out of a dynamic array. The user is to enter the number of temperatures that wish to have me work with, then they enter the numbers. I need to preform a number of different calculations on the data. 1. average of all temps 2. count the number of temps equal to the average 3. count the number of temps above freezing (fahrenheit) 4. count the number of temps below freezing (fahrenheit) 5. display all the numbers user entered
Then display everything in one message box at the end.
I have attached the file.
All help is appreciated!
Thanks!
Option Explicit dim arrtemp(),numtemp,x,mess,avtemp numtemp=InputBox("How many temperatures would you like to enter?","Number of Temperatures") numtemp=CInt(numtemp) x=numtemp-1 ReDim arrtemp(x) For Each x In arrtemp mess=inputbox("Enter a temperature") Next For arrtemp=0 To(x+1)
This post has been edited by dmcollette664: 28 Sep, 2008 - 06:50 AM
|