Gas Price

Create a “Gas Price” Windows Form Application,
Allow user to enter gas prices for 12 month from the textbox and click the Enter button.
Create a 12 element 1-dimensional array of Decimal type
Store the prices in the array, and get price from the array, display in the listbox immediately.
When click “Get Highest Price” button, iterate the elements in the array and find the highest price and its month.
When click “Get Lowest Price” button, iterate the elements in the array and find the lowest price and its month.
When click “Get Average Price” button, iterate the elements in the array and find the average price.
Display results on the form.

 
Powered by