You are on page 1of 1

//

// Parking.swift
//
//
// Created by Gerardo Quintanar Morales on 24/02/24.
//

import Foundation

/*
[11:21] Aravind A (CW)
When a customer wants to leave, they will give that ticket to the automated ticket
taker at the exit. They will then be presented with their total based on the amount
of time they were parked.
Provide a way to calculate the total given the following requirements: 1) The
first hour is free 2) Every hour after that is 1.50
*/

func calculateTime(minutes: Int) -> void {


let firstHour = 60
let pricePerHOur = 1.5
let now = Date(now)
var timeSpent = now - firstHour
var finalPrice = timeSpent * price

minutesFromDate
}

You might also like