Home Segments Index Top Previous Next

296: Practice

Define a structure named hlc, for high, low, close, that has three structure variables, high, low, and close.

Use your structure in a program that reads up to 100 lines of high–low–close price data. Your program is to write those data into an array of 100 hlc structures, and then to compute and display the averages of the high, the low, and the closing prices.