29 lines
618 B
Swift
29 lines
618 B
Swift
// Calc.swift
|
|
// bignumcalc
|
|
// 2025-03-31
|
|
//
|
|
// The author disclaims copyright to this source code. In place of
|
|
// a legal notice, here is a blessing:
|
|
//
|
|
// May you do good and not evil.
|
|
// May you find forgiveness for yourself and forgive others.
|
|
// May you share freely, never taking more than you give.
|
|
//
|
|
|
|
import Foundation
|
|
var a: Double
|
|
var b: Double
|
|
var operation: String
|
|
|
|
print("Enter first number: ")
|
|
a = Double(readLine() ?? "") ?? 0
|
|
|
|
print("Enter operation (+, -, *, /): ")
|
|
operation = readLine() ?? ""
|
|
|
|
print("Enter second number: ")
|
|
b = Double(readLine() ?? "") ?? 0
|
|
|
|
switch operation {
|
|
|
|
}
|