Added some basic math that doesn't work (forgot to stage my changes)
This commit is contained in:
parent
c995648a3e
commit
bf890f54a8
2 changed files with 28 additions and 2 deletions
25
Calc.swift
25
Calc.swift
|
|
@ -1,8 +1,29 @@
|
|||
//
|
||||
// Calc.swift
|
||||
// bignumcalc
|
||||
// 2025-03-31
|
||||
//
|
||||
// Created by Isaac Greene on 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 {
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue