I'm trying to dive into swift a little bit and started trying to make something simple and I keep getting this error: "Fatal error: Unexpectedly found nil while unwrapping an Optional value"
I've looked around on here and google and tried what they told me to do and it doesn't work and I feel stupid af.
This is my code:
import Foundation
import Glibc
print("How much did you spend today: ")
if let input = Int(readLine()!){
print("You have spent", input)
}
else{
print("The input is not a number")
}