VB 6 Help calculating second moment of area!!
I am required to write the code fragment to calculate the second moment of area for 5 hollow circular sections assuming that the diameter and thickness for the 5 sections are stored in the text file results.dat. The text file contains 5 lines, one per Circular Hollow Section and the data is stored as diameter,thickness. I am required to read this file and stor the diamters in one-dimensional array called d and the associated thickness are to be stored in a one-dimensional array called t. I have to calculate the second moment of area for all 5 sections using the formula pi*d^4/64 and output results.
Any ideas/suggestions on how i should begin to do this?? i am very new to visual basic and would appreciate some help
Re: VB 6 Help calculating second moment of area!!
policy here, i believe, is we do not do your homework, we will help with code if some of it does not work correctly
there are many examples on reading text files, search for open for input
check out split, to divide up a string read from a file
then do the math with your formula, looping through the arrays and display output to some control