Skip to content

Instantly share code, notes, and snippets.

pawelkijowskizimperium

View GitHub Profile
View ViewController.swift
//
// ViewController.swift
// TableViewWithDynamicSections
//
// Created by Pawel Kijowski on 2/6/19.
// Copyright © 2019 Pawel Kijowski. All rights reserved.
//
import UIKit
View digitalRoot.swift
import UIKit
func digitalRoot(of number: Int) -> Int {
if (number <= 0) {
return number
} else if (number % 9 == 0) {
return 9
} else {
return number % 9
}
You can’t perform that action at this time.