//   "Silver chalenge" from page 102 of "Swift Programing" by

// The challenge is to move arrays into a dictionary and print

// the zipcodes.

// Coty Millers "solution" - 26Aug17

//

// Run in Xcode 8+ playground, target as MacOS

//

let OhioCountyNames: [String] = ["Monroe", "Noble", "Washington"]

let OhioZipCodes: [Int] = [43915, 43724, 45750]


var Dict0 = [String:Int]()           // create New Dictionary.


for i in 0...OhioCountyNames.count-1 // -1 is needed because count gives

    // litteral count of array, 0 being that

    //the array is empty, thus for will try

    //and move 4 arrays instead of 3.

{

    Dict0[OhioCountyNames[i]] = OhioZipCodes[i]

}


print("Ohio has some zip codes. ")

//

// For loop to print unwrapped values...

//

var i = 0

for (key,value) in Dict0{

    i=value

    print(value)

}