Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 642 Bytes

README.md

File metadata and controls

11 lines (10 loc) · 642 Bytes

Swift-Collection-Example

Collections in Swift (Dictionary)

Suppose we have electricity bills for a year - 12 months from January to December. Every bill has an amount of money. Create a program to let the user enter these amounts. Then let the program do the following:

  1. Ask the user to select the month and print the amount of the bill for that month.
  2. Find and print the average of all bills
  3. Find and print the average of each quarter of the year. So print the quarter number and its average.
  4. Print names of months which their bills more than 75$
  5. Print the name of the month that has the minimum bill amount