This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
//미션1. inch -> cm , 전달인자 레이블사용을 사용하여 inch -> m 도 가능 | |
func convertToCM(from fromInches : Float,to fromInchesM : Float = 0) -> Float | |
{ | |
var answer = fromInches*2.54 | |
if fromInchesM == 0 | |
{ | |
print("\(answer)cm") | |
} |