/*Copyright ElohimTov LLC*/ /* //Name: ElohimTov Solve Code - Data Types - Swift Solution //Problem: HackerRank - 30 Days of Code - Data Types //Current File: ElohimTovSolve_DataTypes.(swift).txt //Compile-able File: ElohimTovSolve_DataTypes.swift //Date: Created 02/9/2019; 12/31/2021 //Tale: ElohimTov Solve's Solution to HackerRank.com's // Data Types problem in Swift programming language. // Problem link at https://elohimtov.com/elohimtov.info. */ var i = 4 var d = 4.0 var s = "HackerRank " /* Declare second integer, double, and String variables. */ var i0, i1: Int; var d0, d1: Double; var s0, s1: String; /* Read and save an integer, double, and String to your variables. */ i0 = Int(readLine()!)!; d0 = Double(readLine()!)!; s0 = readLine()! /* Print the sum of both integer variables on a new line. */ i1 = i + i0; print(i1); /* Print the sum of the double variables on a new line. */ d1 = d + d0; print(d1); /* Concatenate and print the String variables on a new line. */ /* The 's' variable above should be printed first. */ s1 = s + s0; print(s1); /*Copyright ElohimTov LLC*/