Swift program to create variables with specifying data type

bookmark

var num1 = 10;
var num2 = 20.56;

print("Num1: ",num1);
print("Num2: ",num2);

 

 

Output:

Num1:  10
Num2:  20.0

...Program finished with exit code 0
Press ENTER to exit console.