/*Copyright ElohimTov LLC*/ /* //Name: ElohimTov SolveCode - Data Types - C# Solution //Problem: HackerRank - 30 Days of Code - Data Types //Current File: ElohimTovSolve_DataTypes.(cs).txt //Compile-able File: ElohimTovSolve_DataTypes.cs //Date: Created 02/9/2019; 12/31/2021. //Tale: ElohimTov Solve's Solution to HackerRank.com's // Data Types problem in C# programming language. // Problem link at https://elohimtov.com/elohimtov.info. */ using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { int i = 4; double d = 4.0; string s = "HackerRank "; /* Declare second integer, double, and String variables. */ int i0, i1; double d0, d1; string s0, s1; /* Read and save an integer, double, and String to your variables. */ i0 = int.Parse(Console.ReadLine()); d0 = double.Parse(Console.ReadLine()); s0 = Console.ReadLine(); /* Print the sum of both integer variables on a new line. */ i1 = i + i0; Console.WriteLine(i1.ToString()); /* Print the sum of the double variables on a new line. */ d1 = d + d0; Console.WriteLine(d1.ToString("0.0")); /* Concatenate and print the String variables on a new line. */ /* The 's' variable above should be printed first. */ s1 = s + s0; Console.WriteLine(s1); }//ends static void Main }//ends class Solution /*Copyright ElohimTov LLC*/