0

How to print a float number using variable using swift language

Only swift language

25th Aug 2019, 4:42 AM
Yash chitroda
Yash chitroda - avatar
5 Respostas
+ 3
var n: Float = 3.1416 print(n) (Swift) If you don't specify float, Swift will assume a double, which is the default.
25th Aug 2019, 6:10 AM
David Ashton
David Ashton - avatar
+ 6
print(4/2) # output: 2.0 (Python)
25th Aug 2019, 4:43 AM
David Ashton
David Ashton - avatar
+ 5
Yash chitroda can you clarify whether "float no using" means "float NOT using" or "float NUMBER using"?
25th Aug 2019, 5:22 AM
David Ashton
David Ashton - avatar
+ 1
Its a number not a (no)
25th Aug 2019, 5:25 AM
Yash chitroda
Yash chitroda - avatar