Skip to content

Instantly share code, notes, and snippets.

@madson
Created November 3, 2017 21:35
Show Gist options
  • Save madson/8d17cf3a776e65323357c82ffabcebea to your computer and use it in GitHub Desktop.
Save madson/8d17cf3a776e65323357c82ffabcebea to your computer and use it in GitHub Desktop.
import Foundation
var input = readLine()!
let upperCaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
var count = 1
for letter in input.characters {
if upperCaseLetters.contains(String(letter)) {
count = count + 1
}
}
print(count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment