Skip to content

Instantly share code, notes, and snippets.

@sjehutch
Last active August 18, 2019 04:21
Show Gist options
  • Save sjehutch/badd453ab6dcdc673803b311081699ee to your computer and use it in GitHub Desktop.
Save sjehutch/badd453ab6dcdc673803b311081699ee to your computer and use it in GitHub Desktop.
HackerRank1
using System;
namespace myBlank
{
class Program
{
static void Main(String[] args)
{
int i = 4;
double d = 4.0;
string s = "HackerRank ";
int k = Convert.ToInt32(Console.ReadLine());
var m = Convert.ToDouble((Console.ReadLine()));
var l = Convert.ToString(Console.ReadLine());
// Print the sum of both integer variables on a new line.
Console.WriteLine(k + i);
// Print the sum of the double variables on a new line.
Console.WriteLine(m + d);
// Concatenate and print the String variables on a new line
// The 's' variable above should be printed first.
Console.WriteLine(s + l);
Console.Read();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment