0

Create a function called “timeAdder” using swift

Create a function called "timeAdder" that can add two time values together. For example, it should be able to add 25 hours and 3 days together. The function should accept 4 parameters: value1, label1, value2, label2 - value1 and value2 should accept positive integers - label1 and label2 should accept any of the following strings: "seconds", "minutes", "hours", "days", "second", "minute", "hour", "day" For example your function may be called in any of the following ways: timeAdder(1,"minute",3,"minutes") timeAdder(5,"days",25,"hours") timeAdder(1,"minute",240,"seconds")

15th Nov 2020, 5:06 PM
Brown
Brown - avatar
2 Antworten
+ 2
Brown please 🙏 don't ask assignment directly if you have attempt well come
15th Nov 2020, 5:29 PM
Ananiya Jemberu
Ananiya Jemberu - avatar
0
am stuck thats why am asking, thank you
15th Nov 2020, 5:46 PM
Brown
Brown - avatar